brianvoe / slim-select

Slim advanced select dropdown
http://slimselectjs.com
MIT License
1.05k stars 200 forks source link

Select not updated when original select options change #477

Closed fredOpenscop closed 11 months ago

fredOpenscop commented 1 year ago

Hello,

I'm using your library in replacement of jquery chosen since we are moving out of jquery.

I have found an issue with some of our select. We have this issue with the select that we update in Ajax base on the value of another field. If we don't use your lib on those select, the options are correctly updated. It seems that instantiating a select with your lib make it something like immutable in the HTML?

Here is the result : when we update the Discipline select, it makes an ajax request to set the Activité options image

this is the library that we use, I edited the code to try and see if I could fix the issue by modifying their code, but it didn't work image

Is it normal? Do I need to send a specific event on the original select to update the slim one? (like for chosen with chosen:updated)

I hope I was clear enough.

Best regards.

brianvoe commented 11 months ago

setup a jsfiddle and ill take a look at it.