-
Notifications
You must be signed in to change notification settings - Fork 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
Make FormContext match our other contexts #6302
Conversation
|
||
let {validationBehavior} = useContext(FormContext); | ||
``` | ||
|
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.
Removed default example since we already have one above showing native validation. Adjusted the aria validation example to show a simpler custom validation example. Not sure we should recommend people validate emails via regex. Moved the context example to advanced customization below.
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.
LGTM
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'any' } |
Noticed in audit. FormContext should work like the other contexts in RAC. It should be a slotted value accepting all Form props/ref. Form should consume it, and then also provide its own props via children (not every component does that part right now). Also added some examples to the advanced customization section of the docs.