-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataForm: introduce validity prop
#71412
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
26b113b
Make validation controlled and async
oandregal 9b1fa80
Remove isItemValid
oandregal 1acbc8f
Document useIsFormValid hook
oandregal c965fa8
Test useIsFormValid: port all existing test for isItemValid
oandregal 219dd24
Update FieldValidity and FormValidity types
oandregal 3cbe36d
useIsFormValid: update tests
oandregal 744e219
Update docs
oandregal 81579ac
Create getCustomValidity utility
oandregal 9ff587b
Update tests
oandregal 16676bb
Rename useIsFormValid to useFormValidity
oandregal 522dd49
useFormValidity returns validity and isValid
oandregal b2600d0
Add a test for isValid
oandregal af2bc15
DataForm: datetime control uses validity prop
oandregal 2121abb
DataForm: date control uses validity prop
oandregal e067e62
Add changelog
oandregal f8d2252
DataForm: date control attaches different class depending on type
oandregal 1851f70
Fix unmounting issue with panel dropdown/modal
oandregal 10862ef
getCustomValidity: fall through to elements or custom if validity.req…
oandregal e80ff81
Update changelog
oandregal 84b0a5d
Update README
oandregal 224089f
Story: better custom Edit
oandregal b1979b1
Support combined fields.
oandregal 1027148
Make linter happy
oandregal 375c4a8
story: remove unnecessary flags
oandregal 22c8cb7
Move useFormValidity test to proper place
oandregal 12f88bf
Improve useFormValidity hook
oandregal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update FieldValidity and FormValidity types
- Loading branch information
commit 219dd24eaefd75114aea9ab7928358910984e683
There are no files selected for viewing
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why limit it to "required", "elements" and "custom". I believe we need to absorb more later (min, max...)... So might be better to just keep it open ended and fields can even have their own custom keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easier to open it later than to close it, so I'd rather start small and focused. If we allow anything as key, we'll run into conflicts later when we want to add more keys. For example, imagine we want to add a
min/max/patternskey, but, a 3rd party is already using those.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me but I'm ok with opening later.