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

Array of objects without a 'value' key. #675

Closed ICTVTS3 closed 2 months ago

ICTVTS3 commented 2 months ago

Hello,

I often use arrays of objects fetched from my database combined with the select component. When using objects without a key 'value', the select bugs out. I can initially just select an item from the list and work with that. But if I click the select box again all items in that list are blue/selected and can't be used.

I tried adding a value key with a random value to every object in the array which solves it. This would however be a tedious way of fixing things.

Thanks for checking it out :)