Reputation: 115
I have 5000 list of data which I have to show as select drop down list. I used Select2.js library to implement filter so that It would be easy to find the data to select. It worked good in google chrome but it lags in I.E to filter the data or even to enter the keywords in search box.
This is what I have now.
$('.js-example-basic-single').select2();
});
It let filter the list for each character user types in the filter box.
I changed the code so that to filter only after user enters 3 characters in filter box.
code is :
$('.js-example-basic-single').select2({
minimumInputLength:3
});
This code hide all the list data from drop down. But i do not want to hide the list at all.
I want the ability to filter and select the item but without any lag.
Upvotes: 0
Views: 654
Reputation: 21581
Which version of Select2 version are you using? With refer to this thread and this issue, it seems that this issue might be related to the select2 version, please try to use the latest version.
Besides, how do you fill data in the select2 elements? using <option>
elements or local Javascript array? I think you could try to use the AJAX method to filter data.
Upvotes: 1