Keep dropdown open
I'd writing a component that wraps selectize, and I want to use my own controls to programmatically open and close the dropdown.
I'd like to prevent the default behavior where a click to the triggers the dropdown. Is this possible via selectize's api? I found lock but this didn't seem to do it.
Thanks for the great plugin!
HI @samselikoff, If you dont want to do your own fork from selectize.js, you need a hacked workaround, you may execute this javascript, after the selectize is already in DOM:
$( ".selectize-dropdown" ).show();
This will not be affected by the focusout events.
*If you have more than one "selectize-dropdown" you should just do .show() in this element that you want to open.
btw, when you want to close it just use:
$( ".selectize-dropdown" ).hide();
BR
Marius
Hi @edelsbrunner, I'm trying to do the same thing. The solution you provided didn't work - blur events still caused the dropdown to close
Do you have an alternate solution?
Yes. I was looking for the same enhancement.