-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 ToggleGroupControlOption
not passing ref
to the underlying element
#35546
Conversation
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.
Thanks for the fix!
Out of curiosity, would using |
Since this component is not exposed, I'm okay with the |
Makes sense. We should merge this PR to get the fix in the codebase and then open a follow-up PR to merge |
I will take care of this and open a PR soon Update: Opened #35600 |
This PR is a small fix to avoid future issues.
The internal
ToggleGroupControlButton
component doesn't accept aref
prop. Instead, it expects to receiveforwardedRef
:gutenberg/packages/components/src/toggle-group-control/toggle-group-control-button.tsx
Line 23 in 17bb52b
Because of this, passing
ref
toToggleGroupControlOption
wouldn't work.