Select2 dropdown allow new values by user when user types

前端 未结 3 1336
抹茶落季
抹茶落季 2021-02-09 14:44

The select2 component can be configured to accept new values, as ask in Select2 dropdown but allow new values by user?

And you can see it at: http://jsfiddle.net/pHSdP/

3条回答
  •  轮回少年
    2021-02-09 15:33

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

    tags: true,
    selectOnBlur: true,

    This worked for me

提交回复
热议问题