-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
[Field] Add filled and focused style hooks #1341
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -79,6 +79,7 @@ export function useRadioRoot(params: useRadioRoot.Parameters) { | |||
setFieldTouched(true); | |||
setDirty(value !== validityData.initialValue); | |||
setCheckedValue(value); | |||
setFilled(true); |
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.
@atomiks I think in addition to this RadioGroup
also needs to setFilled() in an effect or something, otherwise the initial filled state is incorrect: https://codesandbox.io/p/sandbox/inspiring-ishizaka-ykvk9c?file=%2Fsrc%2FApp.tsx%3A37%2C1
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.
The same happens when using CheckboxGroup
in a Field as well 🤔
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.
Updated - I'm not sure if a data-filled
state should be added for the CheckboxGroup
node; probably not crucial
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 think it's enough to have it on Field ~
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.
Looks good 👍
The new hooks' descriptions are missing from the docs. |
Closes #1324