clearable
behaviour for multiple
select
#271
Replies: 2 comments 4 replies
-
This is not possible with multiselect (read not-implemented). I personally struggle with this use case. If something shouldn't be removable, why don't you just display it somewhere else? Anyway... this is the way you can do it with snippet, why still maintain correct form submit. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion and workaround! Displaying the pre-selection somewhere else is a good alternative but then one still has to explain to the user that that's one of the options and that it's a default selection. Displaying it right in the select, without it being removable, seems like the more intuitive solution. What do you think of adding support for a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use-case where a multiple-select with a predefined value should not be clearable. Setting the
clearable={false}
prop only removes the "clear all selected options" button, but it still allows a user to clear the predefined value either by clickingx
on the selected option or via the backspace key. Is this expected behaviour or is there another way to prevent removing predefined options?Repl: https://svelte.dev/playground/24a6b5c6e07a4bb49ca52cef12d6cc44?version=5.14.1
Beta Was this translation helpful? Give feedback.
All reactions