How to disable creating new tags with select2 v4.0?

后端 未结 4 1943
借酒劲吻你
借酒劲吻你 2020-12-30 23:52

I\'ve been trying out the new Select2 v4.0 which has a lot of improvements. I\'m mainly interested in the tags feature. I want to be able to search for tags via

4条回答
  •  感动是毒
    2020-12-31 00:19

    You can disable tags by removing tags: true when initializing Select2. Or alternatively, setting tags: false when initializing Select2. Tags are only enabled if the tags option is truthy, which it is when you are passing in true.

提交回复
热议问题