Include button in SelectItem, ComboboxItem #3765
Unanswered
mule-stand
asked this question in
Questions
Replies: 1 comment 2 replies
-
That's a tough one since the current ARIA spec doesn't provide a way to represent this type of UI. There's a proposed I plan to write an example of this, but I need to do more research first. My top idea at the moment is to render those action elements outside of the combobox/select list, and then position them next to their respective items using CSS/Floating UI. You can render these elements conditionally by checking if the combobox/select function MyComboboxItem(props) {
const id = React.useId();
const combobox = Ariakit.useComboboxContext()!;
const isActiveItem = combobox.useState((state) => state.activeId === id); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! Can I include button directly in SelectItem, ComboboxItem (like "Delete Item", etc)? And if dont, how I can do it? And how i can show this button only when item is active (like data-[active-item])?
Like this
Beta Was this translation helpful? Give feedback.
All reactions