Prevent reload of data with select2 plugin (v4)

后端 未结 1 1981
忘掉有多难
忘掉有多难 2021-01-07 00:15

I\'m using select2 plugin(v4) and loading his options with ajax.
If i open the select input on the first time the data will be loaded. When I open the select again, the

1条回答
  •  情话喂你
    2021-01-07 00:24

    Since you are using select2_v.4, you have to use data-adapters ( query and initSelection methods were depreciated in V.4.0 ) Following is an example of using custom-data-adapter through an approach called AMD-Pattern. I have had not a chance to test it but I believe this would give you a direction to proceed with.

    
    
    
    
    

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