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

placeholderAlwaysShow not working without isMulti #362

Closed theguy147 closed 2 years ago

theguy147 commented 2 years ago

Currently, the Placeholder can only be set to always show with MultiSelection AND placeholderAlwaysShow=true.

In the README it states:

placeholderAlwaysShow: Boolean Default: false. When isMulti then placeholder text will always still show.

I understand this as the placeholder will always show when isMuli=true. Additionally if isMulti=false it will also always show if placeholderAlwaysShow=true.

To fix this in https://github.com/rob-balfre/svelte-select/blob/7e01a5ac3592ff5a1b7ef0a4f45b204337481d72/src/Select.svelte#L397-L402 the second line should be changed to placeholderAlwaysShow || isMulti instead IMO.

rob-balfre commented 2 years ago

Not sure what this achieves? You only care about placeholderAlwaysShow if isMulti is true.

Thanks for the PR though and sorry for slow reply.