rob-balfre / svelte-select

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

Wrong event type when unchecking in list #575

Closed mabar closed 1 year ago

mabar commented 1 year ago

Hello,

I am using your example with item check boxes https://svelte-select-examples.vercel.app/examples/advanced/multi-item-checkboxes It works greats, except when I uncheck an item, event type is 'select', not 'clear'

I have some extra code that depends on difference between select and clear and I wondered if it could be fixed in the lib. If not it is fine, workaround simple condition !Array.isArray(e.detail) && isChecked[e.detail.value]

Thank you

rob-balfre commented 1 year ago

It's not really a clear event that needs to fire, I'd suggest a on:change event on the input checkboxes.

mabar commented 1 year ago

Okay, thank you. Still trying to figure how this all works :)