Open ghost opened 2 years ago
I've assembled a multi-select component using the native shadcn's components. It's fully in line with design and integrates seamlessly into shadcn's ecosystem. Please, try it out and share your thoughts. https://shadcn-multi-select-component.vercel.app/
@sersavan can you move CommandInput search option within PopoverTrigger?
I've assembled a multi-select component using the native shadcn's components. It's fully in line with design and integrates seamlessly into shadcn's ecosystem. Please, try it out and share your thoughts. https://shadcn-multi-select-component.vercel.app/
@sersavan can you move CommandInput search option within PopoverTrigger?
@zahidiqbalnbs but why?
I've assembled a multi-select component using the native shadcn's components. It's fully in line with design and integrates seamlessly into shadcn's ecosystem. Please, try it out and share your thoughts. https://shadcn-multi-select-component.vercel.app/
@sersavan can you move CommandInput search option within PopoverTrigger?
@zahidiqbalnbs but why?
@sersavan thanks for your reply! You are a code guru and doing great stuff. The only reason for asking is if you look at react-select, antd multiselect, mui multiselect and others, all have search functionality within Input instead of providing them in Popover content. Thats why I am looking for if you can do that, would be really great!! Thanks again for all the wonderful work.
I've assembled a multi-select component using the native shadcn's components. It's fully in line with design and integrates seamlessly into shadcn's ecosystem. Please, try it out and share your thoughts. https://shadcn-multi-select-component.vercel.app/
@sersavan can you move CommandInput search option within PopoverTrigger?
@zahidiqbalnbs but why?
@sersavan thanks for your reply! You are a code guru and doing great stuff. The only reason for asking is if you look at react-select, antd multiselect, mui multiselect and others, all have search functionality within Input instead of providing them in Popover content. Thats why I am looking for if you can do that, would be really great!! Thanks again for all the wonderful work.
@zahidiqbalnbs I appreciate your feedback. If we add a search function to the popover, we need to decide which list to search through. In my component, the list is shown as a table. It would be more convenient to have the search bar in the same place as the table, rather than in the popover. Or propose your solution instead.
+1 🚀
Would be awesome to have multiselect! +1
Contrary to what @sersavan has made, and what some others want, I would much prefer this be as a multiple
argument to the existing Select primitive (as the OP suggests). This is due to accessibility concerns and also DX.
<select>
in HTML already supports choosing multiple selections, albeit in a weird way (it doesn't render as a normal dropdown anymore, but a scrollable block, which looks awful) I would prefer having a checkbox like select but still using <select>
under-the-hood, and not creating a MultiSelect that many other libraries provide.
Another concern is that if you don't use the html <select>
element, I cannot possibly use it in a form without a controlled input; this is horrible for server components that cannot have a stateful controlled element without making the entire form client-side.
Thanks.
just FYI, you can implement multiselect with the dropdown component and checkbox items it is a strange way to do it, but should be pretty easy to implement