I'm using ngx-chips with Angular 5 and cant figure it out how to stop/disable selection of added tags.
I saw in the docs that there is (onSelect) method and try to return false but it is not working. I also try to prevent event with (click), but this method is not available for ngx-chips.
Does anyone know how to stop the tag selection after the tag is added?
You can use the
readonly
property on the tag to achieve what you want. Use theonItemAdded
event from ngx-chips, and when the item is added, set thereadonly
property to true for the new tag.See the docs regarding this here.
Here is a StackBlitz example.