fix: Do not show errors for blank fields in datepicker and listwidget#7032
Merged
Conversation
rishabhsaxena
previously approved these changes
Sep 7, 2021
Contributor
Author
|
/ok-to-test sha=a3c6b5e |
Contributor
Author
|
/ok-to-test sha=7f15d70 |
1 similar comment
Contributor
Author
|
/ok-to-test sha=7f15d70 |
Contributor
Author
|
/ok-to-test sha=8830ed3 |
Contributor
Author
|
/ok-to-test sha=56faefb |
| isValid: true, | ||
| parsed: config.params?.default || 0, | ||
| }; | ||
| } |
Contributor
There was a problem hiding this comment.
qq: We use the default value when it's an "" but not when it's null or undefined?
Contributor
Author
There was a problem hiding this comment.
Yeah that seems to be the case for empty strings https://github.com/appsmithorg/appsmith/pull/7032/files/56faefb9d85880ee1059813380278713b1258fd8#diff-e7e2b5776f9525df854356addbab33804e25601da70d2e77697b22ba8f1e1016R396
jsartisan
approved these changes
Sep 16, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the issue where datepicker default date field shows an error in js mode when it is blank.
This is also fixes the issue where listData field of the ListWidget was showing 3 other errors when the field is black, this was due to an incorrect parsed value being set.
Also fixes the parsed value to how it was before for empty string
"".Related to #6885
Type of change
How Has This Been Tested?
Jest tests
Checklist:
Test coverage results 🧪
🟢 Total coverage has increased