Replies: 2 comments
-
This would be really useful, it fits right in with the current way of composition via Context. I think we have recreate our own |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry for the delayed response. This seems reasonable. We have a similar context for React Spectrum, this would be a little more specific, but the general gist is the same. Feel like making an RFC out of this for discussion? https://react-spectrum.adobe.com/contribute.html#feature-requests |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For TextField component, a value can be passed to TextFieldContextProvider which is then shared with all the child TextField components. It works similarly for some other form field components. So is there a way to have a more generic ContextProvider that can share the value to all the child field components?
TextField example:
How I imagine it could work:
I guess what I'm looking for is a component that can replace
<fieldset>
. I took a look at the Group component but the value passed to context provider is only passed to the group element and not the individual input elements. It also behaves differently from<fieldset>
/CheckboxGroup e.g. passing isDisabled to Group does not disable the child fields.Would be great also to have the group error message to be more composable and work with Form component validation.
Beta Was this translation helpful? Give feedback.
All reactions