rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.27k stars 180 forks source link

inputAttributes.name applied to both search input and hidden value input #471

Closed hmnd closed 2 years ago

hmnd commented 2 years ago

As seen below, when inputAttributes.name is provided, the name is applied to both the search field and the hidden field containing the current value. The internal _inputAttributes should either always have its name property always overridden, or there should be a separate way to specify a name for just the hidden input (preferable IMO). Providing a name value to the hidden input allows for the component to be compatible with <form action> submission without any extra work, so I believe it's a critical feature to have.

image

rob-balfre commented 2 years ago

Added name prop that only applies to hidden field in 5.0.0-beta.24. Thanks