slim-select
slim-select copied to clipboard
Destroy and recreate Slim Select on ie11 not working
Describe the bug When I used slim select on ie11 first load works fine, but after I used destroy method and, then I tried to create it again, that didn't happen.
I also tried to use https://slimselectjs.com/methods on ie11 and see if I was forgetting something, but that page do not loads on ie11.
This is the code I'm using, which works on the rest of the browsers:
` var slimSelect = null;
function startSlimSelect() { slimSelect = new SlimSelect({ select: "#multiple", searchText: "Sorry couldn't find anything" }); }
function destroySlimSelect() { slimSelect.destroy(); }
function clearSlimSelect() { if (slimSelect) { destroySlimSelect(); slimSelect = null; $("#multiple option:selected").prop("selected", false); startSlimSelect(); } } `
Any suggestions on how can I configure or fixing this issue?
Thank you in advance.
Screenshots
First load works fine
After I destroyed it, it disappear: no console issues
Thanks for submitting this. I tried pulling it up in ie11 and it didnt work so ill see if i can spend some time getting things working again and see if that fixes your problem. That being said I dont know how much longer i can support ie11, as soon as it hits a certain low usage point ill probably remove it. Unless convinced otherwise
To shed some additional light on this, it looks like in IE11, the "ssid" data attribute on the original select is not cleared upon destroy. Also, if the original select has a "style="display:none", that is carried over onto the slim-select object. Resolution was to manually remove the ssid data attribute from the original select, and then manually remove the display:none from the slim-select object.
ok thats good to know. Ill keep that in mind
New version of slim select has been released. If this is still an issue let me know and ill try to take care of it.