Skip to content


Add refresh method to bootstrap-select.js #368

siebird opened this Issue · 4 comments

5 participants



I'm currently in need of being able to use the refresh method after manipulating a select menu. I tried adding this myself but have fallen short.

@pytkin pytkin added the enhancement label

I need this too in order to be able to disable a select item using javascript. It seems that the flatui bootstrap-select.js is different and incompatible with the recent one at The latter one does include a refresh() method and their demo page shows it working...


I was able to get this working using the render method after manipulating the select menu: $('#some_id').selectpicker('render');
However, if I used multiple selectors like $('#some_id, #someother_id').selectpicker('render'); it would loop through twice and nest the select menu causing it to break.


The closest thing to the equivalent of refresh method would be $('select').selectpicker('reloadLi');.
I also had a problem reordering <option> elements, and this method works great.


We switched to select2.js plugin in the latest release, please check it out.

@andrew-ml andrew-ml closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.