Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow setting custom tabIndex on the <Switch /> component #2966

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

RobinMalfait
Copy link
Member

This PR allows overriding the tabIndex of the <Switch /> component if you need to change the tab index. However, we still need it to be focusable using the keyboard so we will always fallback to 0 even if -1 was pased.

Fixes: #2915

Copy link

vercel bot commented Feb 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2024 4:20pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2024 4:20pm

@RobinMalfait RobinMalfait merged commit 0e0277a into main Feb 3, 2024
8 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-2915 branch February 3, 2024 16:31
RobinMalfait added a commit that referenced this pull request Apr 15, 2024
* allow setting a custom `tabIndex` on the `<Switch />` component

* update changelog
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch does not support tabindex
1 participant