hernansartorio / jquery-nice-select

A lightweight jQuery plugin that replaces native select elements with customizable dropdowns.
http://jqueryniceselect.hernansartorio.com
961 stars 285 forks source link

Nice select dropdown not working with "e.stopPropagation();" #98

Open tijosfx opened 4 years ago

tijosfx commented 4 years ago

Hi all, Nice select dropdown not working with "e.stopPropagation();" can you please help with this? See demo: https://codepen.io/tijosfx/pen/zYvogXJ

Thanks

weidmaster commented 4 years ago

I have a similar issue. In my application I open a form in a modal (using bootstrap) and when the form is submitted using ajax and the modal closes, the nice select stops working.

I tried to destroy and recreate the select, update the select but nothing works.

What is interesting is that other evens, like the ajax reload of a Datatable, does work as intended after the modal closes. I guess it has to do with the stopPropagation()as well, because if I just open the modal but closes it without submitting the form, nice select still works.