svelte-select icon indicating copy to clipboard operation
svelte-select copied to clipboard

hidden input value doesn't get clear after clearing

Open EssaAlshammri opened this issue 1 year ago • 1 comments

Hi there,

I wanted to thank you for the awesome library you created. I've been using it for a project I'm working on, and it's been a great help.

I noticed one issue, though. When I hit the clear button after selecting an item, the hidden input value doesn't get cleared. This means that if I submit the form without selecting anything, it will still get the value that was selected last.

I'm not sure if this is a bug or if I'm doing something wrong.

<Select
    items={facultySelect}
    class="!input !input-bordered w-full max-w-md"
    >
    <svelte:fragment slot="input-hidden" let:value>
        <input type="hidden" name="faculty" {...value} />
    </svelte:fragment>
</Select>

EssaAlshammri avatar May 27 '23 17:05 EssaAlshammri