Trying to remove focus from Switch component #3518
Unanswered
barbararcbf12
asked this question in
Help
Replies: 1 comment
-
Hey! Are you talking about a Headless UI That said, even if we allowed passing
Hope this helps! |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
^2.1.2
What browser are you using?
Chrome
Reproduction URL
Describe your issue
I have a menu that is closed (hidden) at first, and it opens if clicked or the "Enter" key is pressed.
I am in a situation where I have a
Switch
component located in the menu I mentioned above. So, I would like to remove the focus from theSwitch
element when the menu is closed, but I am stumbling upon the fact that I cannot assign "-1" to thetabIndex
prop.Would it be possible to change it so I can disable focus to the
Switch
component?headlessui/packages/@headlessui-react/src/components/switch/switch.tsx
Line 227 in 49c081d
Beta Was this translation helpful? Give feedback.
All reactions