-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix validations for controlled datefield components #5991
fix validations for controlled datefield components #5991
Conversation
GET_BUILD |
Build successful! 🎉 |
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.
Just some small nit picks, but otherwise looks good to me, verified locally that a controlled isInvalid = false
makes the FieldError no longer display errors in real time
GET_BUILD |
Build successful! 🎉 |
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.
I'm trying to determine with the controls added (thanks by the way) if changing between false
and true
should bring up the errorMessage again. it currently doesn't even if the error message showed before I put isInvalid into a controlled state
- set isInvalid to controlled state
false
- enter a min-date
- set datefield to less than that
- put isInvalid into controlled state
true
@snowystinger that's exactly what this change does and what is expected in #5963. Passing a controlled(true, false) value to |
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.
LGTM, thanks!
@@ -82,8 +82,8 @@ function useFormValidationStateImpl<T>(props: FormValidationProps<T>): FormValid | |||
} | |||
|
|||
// If the isInvalid prop is true, update validation result in realtime (controlled). |
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.
// If the isInvalid prop is true, update validation result in realtime (controlled). | |
// If the isInvalid prop is controlled, update validation result in realtime. |
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.
done
I just wanted to let you know that the team might be slow to review as we address some other priorities. We appreciate your understanding and apologize for the wait. |
GET_BUILD |
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'any' } |
Closes #5963
✅ Pull Request Checklist:
📝 Test Instructions:
http://localhost:9003/?path=/story/react-aria-components--date-field-example&args=minValue:1735686000000;validationBehavior:aria&providerSwitcher-express=false&strict=true
🧢 Your Project: