Select2 dropdown allow new values by user when user types

安稳与你 提交于 2019-12-03 07:57:19

Adding attribute selectOnBlur: true, seems to work for me.

Edit: glad it worked for you as well!

I am using Select2 4.0.3 and had to add two options:

tags: true,
selectOnBlur: true,

This worked for me

And to be able to submit multiple new choices together with the existing ones:

select2({tags: true, selectOnBlur: true, multiple: true})
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!