Angular Select2 limit number of tags

856 Views Asked by At

I have a select2 field for tags as in example: https://github.com/angular-ui/ui-select2#using-simple-tagging-mode

However, I would like to limit the number of tags selected to 1. User could either use one of the existing tags or create a new one.

Changing 'multiple' to false doesn't affect this.

1

There are 1 best solutions below

0
On BEST ANSWER

Managed to find a solution through this discussion (do not use tags after all):

https://github.com/ivaynberg/select2/issues/521#issuecomment-18642522