Is there a way to have an element inside a Select.Item
that prevents the select from closing?
#1282
Replies: 1 comment
-
Hey @maximedupre, The I'm working on this in the background, specifically by adding more components that give flexibility for UIs like this, where you don't need to violate every accessibility rule in the book to get the behavior you want. This behavior is the ability to select an item while having additional functionality for each, and would really fall under the "grid" pattern inside of a popup. However, I'll only advise you on what the correct practices are, I won't prevent you from going against them, especially since Bits doesn't have a component that safely offers this capability. We use the <button onpointerup={(e) => e.stopPropagation()}>
Play
</button> |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Not sure if this is a feature request, or if it can already be done.
Basically, I have a play button inside every select item. When I click on it, it should play a preview, but also keep the select open (see attached image).
I have tried
on the click handler of the button, but no success. I have also tried
onclickcapture
, but still no success. There is probably a capture event handler that comes before, so my attempt at stopping propagation is failing.Is there currently a way to keep the select open while clicking on a children element of a
Select.Item
? :)Beta Was this translation helpful? Give feedback.
All reactions