Closed JohnJVTK closed 4 years ago
Please provide an Online Example to show your problem, thanks!
@JohnJVTK After debugging the problem and find that we need to listen to the shown.bs.tab
event of tabs, and use the refresh
method to solve the problem.
http://multiple-select-live.wenzhixin.net.cn/code/wenzhixin/1915
Hope this can solve your problem.
Thank you everything works fine now !
Btw I modified your code so that it can apply in the whole application (cause I have 20+ multiselect). I put this only once in my global javascript file (site.js) :
$('[data-toggle="tab"]').on('shown.bs.tab', function (e) {
const tabId = $(e.target).attr('aria-controls');
$('#' + tabId + ' select.ms-offscreen').multipleSelect('refresh');
});
http://multiple-select-live.wenzhixin.net.cn/code/JohnJVTK/1952
Hello !
I'm using multiple-select for months in my company after switching to bootstrap 4. I'm currently experienced a bug after migrating from 1.3.1 to 1.5.2. I have a select with 5000+ records (suppliers for my company) in a multi tabs form. If the select is in the 1st tab, everything is fine but if it's in the 2nd and I swap from 1st to 2nd, the displayed records flickers and I'm stuck with the first 7 elements. FYI the bug disappears if I filter by tapping a single letter then remove it. There is no bug if I display only 100 records.
I wrote this simple code to explain the bug :
Sorry but English is not my native language. Any help appreciated.