Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show clearable when readonly/disabled #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

philippone
Copy link

@philippone philippone commented Mar 4, 2022

Fixes #145

@pstanoev
Copy link
Owner

pstanoev commented Jun 1, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clearable Button clickable when disabled/readonly
3 participants