simple-svelte-autocomplete
simple-svelte-autocomplete copied to clipboard
Do not show clearable when readonly/disabled
Fixes #145
This will also disable the clear in the read-only mode. But in the demo, in readonly mode:
"The readonly attribute is passed to the HTML input. When true
then the text input cannot be edited, but items can still be selected in the menu."
Doesn't clear button also make sense in this case?
It doesn't make sense in the disabled mode and that is a bug.
I think I will change the rule to:
$: clearable = !disabled && (showClear || ((lock || multiple) && selectedItem))