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

multiple together with label does not work #556

Closed jorri11 closed 1 year ago

jorri11 commented 1 year ago

I am trying to use the Select together with the label property and multiple. The problem is when i choose just one item i am no longer able to choose any more. Reproducible example below:

<script>
        window.process = {env: {}} // REPL issue, ignore
    import Select from 'svelte-select';

    let items = [
        { someProp: 123, name: 'One' },
        { someProp: 345, name: 'Two' },
        { someProp: 567, name: 'Three' },
    ];
    let value
</script>

<Select bind:value {items} multiple label="name" />

Result after choosing one item:

image
rob-balfre commented 1 year ago

Need to pass in itemId if you're using a collection without a value property

On Thu, 16 Feb 2023, 12:27 am jorri11, @.***> wrote:

I am trying to use the Select together with the label property and multiple. The problem is when i choose just one item i am no longer able to choose any more. Reproducible example below:

<Select bind:value {items} multiple label="name" />

Result after choosing one item:

[image: image] https://user-images.githubusercontent.com/42845131/219039340-09e6675b-c996-4656-9d2a-a6376ce8bea3.png

— Reply to this email directly, view it on GitHub https://github.com/rob-balfre/svelte-select/issues/556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUAM7RMJX4ZC3ELP5MIFQTWXTKVHANCNFSM6AAAAAAU43FQSA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jorri11 commented 1 year ago

Thank you