-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(editors): add form/input reset to Composite Editor modal & fix touched value #267
Merged
Conversation
This file contains 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
- on a Mass Update modal, whenever an input is touched, it will apply that empty value to all the items in the grid (for example if user types "123" and deletes it, now it becomes "" empty string which is what will be applied). - in some cases, applying empty string is what we might want but in other cases the user might just want to reset to the original value (on a Mass Update form, the original value would be blank) without having that value changed in the "formValues" object, this is what this PR does, it allows to reset the value while also exclude it from the "formValues" object.
- provide 2 optional way to reset each input value(s) and/or the entire form - also add `isValueTouched` to every editor to fix some problem detected in the Composite Editor form, if user type something and deletes it, it wasn't showing the orange outline (but it should) and it was still applying empty value to all rows in the grid which was unexpected by the user, the new `isValueTouched` is now used to show the orange outline instead of the `isValueChanged` which serves a different purpose
Codecov Report
@@ Coverage Diff @@
## master #267 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 209 209
Lines 12119 12357 +238
Branches 4170 4230 +60
==========================================
+ Hits 12119 12357 +238
Continue to review full report at Codecov.
|
1236836
to
df1f549
Compare
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.
isValueTouched
to every editor to fix some problem detected in the Composite Editor form, if user type something and deletes it, it wasn't showing the orange outline (but it should) and it was still applying empty value to all rows in the grid which was unexpected by the user, the newisValueTouched
is now used to show the orange outline instead of theisValueChanged
which serves a different purposeTODOs
isValueTouched
in E2E test