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

Make the input hidden slotable #579

Closed Ennoriel closed 1 year ago

Ennoriel commented 1 year ago

Hey (again)!

Thanks again for the quick fix last time. :)

I think it would be nice to have the input hidden slotable because that way, it'd be possible to format the value (use one attribute, or format with a different method than JSON.stringify):

the line in question https://github.com/rob-balfre/svelte-select/blob/master/src/lib/Select.svelte#L814 😃

Edit: the fallback could also be surronded by a non null check on name since the input hidden is only usefull in case there is a name

Have a nice day 🌞

rob-balfre commented 1 year ago

@Ennoriel interesting idea, fancy making a PR? As long as it defaults to current setup it would be a nice non-breaking addition

Ennoriel commented 1 year ago

yes :)

rob-balfre commented 1 year ago

Released in 5.6.0