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

How to disable a selected tag and prevent it from getting deleted? #318

Closed
benmwendwa opened this issue Mar 3, 2023 · 1 comment
Closed

Comments

@benmwendwa
Copy link

When using mode='tags', a selected tag can be deleted by using the backspace/delete key or by clicking the x or close icon.
Using a custom tags slot, its possible to hide the x icon, but the tag will still be deleted using backspace key.
How can this be prevented?

I created a JSFiddle example showing above cases.
https://jsfiddle.net/uvnw0khx/

@adamberecz
Copy link
Collaborator

From 2.6.0 you can add either remove: false to the option or disabled: true. If you add disabled: true you might don't even need a custom template but it will have disabled style (which you can override with custom CSS if that's easier).

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

No branches or pull requests

2 participants