phossa / smartselect

SmartSelect is a jQuery multiple select (multiselect) and tree / hierarchy select plugin with bootstrap style. It is 10x faster than similar plugins and supports complex data models.
http://phossa.github.io/smartselect/docs/index.html
52 stars 14 forks source link

remove all options #9

Closed sodayg closed 8 years ago

sodayg commented 8 years ago

hi. great plugin is there a way to remove all options and not one by one? when i have a lot of options the process of deleting all of them is a bit too slow thanks

phossa commented 8 years ago

hmm. Just out of curiosity, why do you want to remove all options ? I would suggest first empty your HTML select then rebuild (create) a new plugin base on this new HTML SELECT. If this does not help, I will look at the code and find another simple way.

sodayg commented 8 years ago

i'm working with an instance of the plugin and i use the plugin in 3 places on my page with diferent instances. when i empty the html and create the plugin - the instance remember the old options. what am i doing wrong?

phossa commented 8 years ago

I just released a new version 1.0.24 with a new public method clearAllOptions(). The demo and doc html page are updated.