Adding <button>
to a <ComboBox>
/<ListBox
/ Keeping Popover visible as long as focus is inside of it
#5489
Unanswered
gregoralbrecht
asked this question in
Q&A
Replies: 1 comment 3 replies
-
You could possibly use links https://react-spectrum.adobe.com/react-aria/ComboBox.html#links |
Beta Was this translation helpful? Give feedback.
3 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.
-
Hey there 👋 I'm trying to build something that lets people search for an option in a long list of options and click a button to add an option. It's basically what Reach UI has in their examples (called "Lots of arbitrary elements" here)
I've added such a button to one of the examples here: https://codesandbox.io/p/sandbox/romantic-chaum-j88ng3
The markup feels correct to me (i.e., button's outside the listbox). However, as soon as the button receives focus, the popover will close. Which kinda makes sense to me, but I also can't figure out how to best ensure it doesn't happen 🤓
→ How can I keep the popover open while the focus is outside of the listbox but still inside of the popover?
Beta Was this translation helpful? Give feedback.
All reactions