“query function not defined for Select2 undefined error”

前端 未结 13 1457
名媛妹妹
名媛妹妹 2020-11-28 04:22

Trying to use Select2 and getting this error on multiple item input/text field:

\"query function not defined for Select2 undefined error\"
相关标签:
13条回答
  • 2020-11-28 05:23

    It seems that your selector returns an undefined element (Therefore undefined error is returned)

    In case the element really exists, you are calling select2 on an input element without supplying anything to select2, where it should fetch the data from. Typically, one calls .select2({data: [{id:"firstid", text:"firsttext"}]).

    0 讨论(0)
提交回复
热议问题