I'm migrating my rails app from select2 to slim-select. I have a select menu where a user selects their location for the day, and that menu loads pre-selected to the location the user saved yesterday. If their location changed, they can use the search bar to search for their new location (loaded via Ajax). This was easy in select2. But, in slim-select it is not easy.
I find that loading any select options on page load actually causes slim-select to fail loading from Ajax. Whatever option(s) exist at page load are the only options available. However, if the options are set as [], then slim-select will successfully make an Ajax call and display filtered locations.
I'm hoping to get some help getting slim-select to load with an initial selected value, that can be changed using the search/filter if need be.
Here is an associated issue at slim-select that is exactly what I'm after.
Thanks!