rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.26k stars 175 forks source link

selected listItems disappears from the dropdown in multi select mode #457

Closed kishore-rajendran closed 1 year ago

kishore-rajendran commented 1 year ago

As a hack, I'm creating a new "list" component and passing it to the "select" component to list down all the values, and dispatch a listener to change the value outside the component when the selected value is clicked again. (P.S. I haven’t tried it out yet)

Is there an alternate solution where I can list down all the items in the list dropdown for multi-select, and make it selected when clicked the first time, and unselected when clicked for the second time?

rob-balfre commented 1 year ago

This should give you some pointers... https://svelte-select-examples.vercel.app/examples/advanced/multi-item-checkboxes