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

Add method to sort groups #643

Open phlogios opened 7 months ago

phlogios commented 7 months ago

I have two groups: 'Items' and 'My items'.

const groupBy = (item) => item.user_id ? 'My items' : 'Items';

<Select items={searchItems} label="name" {groupBy}>
</Select>

No matter how I sort my items, the 'Items' group will always be on the top, and I want it the other way around. I suggest exposing a method for sorting the set of groups.