-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(select): focus the correct selected item in an action sheet interface with a header #30481
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Thank you for the PR! I added some tests to avoid a future regression but the fix looks good! 🙂
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 great to me!
Issue number: resolves #30480
What is the current behavior?
When using a select component with the
action-sheet
interface, aheader
, and a default selected value, the action sheet opens with the wrong item focused. This happens because the focus logic usesnth-child
to target the selected item, which incorrectly includes the header since it is a child element. As a result, the focus is shifted one item above the correct selection.What is the new behavior?
action-sheet
with a header from a select.Does this introduce a breaking change?
Other information
Preview