angular-selectize
angular-selectize copied to clipboard
When selectize-input is focused and i click on it - the Dropdown close and open every click.
it's work only if: maxItems: 1, And it cause some problem But when maxItems > 1, then dropdown is never close when i click on focused selectize-input.
the problem is that value beacame = '' I use this https://github.com/selectize/selectize.js/issues/340#issuecomment-489226146 to solve situation when user type wrong text for autocomplete, and then click out of the input - the value is restore to previos.
I think, i found, but maybe i broke smth else, and maybe it's bad practice. In source code:
if (e.target !== self.$control_input[0]){
//return "single" === self.settings.mode ? self.isOpen ? self.close() : self.open() : defaultPrevented || self.setActiveItem(null),!1
return "single" === self.settings.mode ? defaultPrevented : defaultPrevented,!1
}
Maybe someone know how better solution?