simple-svelte-autocomplete icon indicating copy to clipboard operation
simple-svelte-autocomplete copied to clipboard

Do not show clearable when readonly/disabled

Open philippone opened this issue 2 years ago • 1 comments

Fixes #145

philippone avatar Mar 04 '22 12:03 philippone

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))

pstanoev avatar Jun 01 '22 13:06 pstanoev