Custom element for initial focus when opening a popover #915
-
As of right now I have a popover where its first focusable element is not the close button (design team decisions) and the first focusable item is not the least destructive action, in these scenarios we might want the focus on a different element as seen here. Is there a way to achieve this? Thank you for the awesome library and all the hard work! |
Beta Was this translation helpful? Give feedback.
Answered by
benoitgrelard
Oct 13, 2021
Replies: 1 comment 1 reply
-
Hi @arequejo, yes you can use the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
arequejo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @arequejo, yes you can use the
onOpenAutoFocus
prop and prevent our default behaviour (event.preventDefault
) and run your own focus then instead.