Skip to content
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

Merged
merged 2 commits into from
May 1, 2024
Merged

Make FormContext match our other contexts #6302

merged 2 commits into from
May 1, 2024

Conversation

devongovett
Copy link
Member

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.


let {validationBehavior} = useContext(FormContext);
```

Copy link
Member Author

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.

@rspbot
Copy link

rspbot commented May 1, 2024

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devongovett devongovett merged commit 313cc05 into main May 1, 2024
24 of 25 checks passed
@devongovett devongovett deleted the form-context branch May 1, 2024 17:51
@rspbot
Copy link

rspbot commented May 1, 2024

@rspbot
Copy link

rspbot commented May 1, 2024

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants