angular-selectize
angular-selectize copied to clipboard
how to get focus?
how to set focus on selectize input control on config? This work for me but is the way?
settings.onInitialize = function() {
selectize = element[0].selectize;
setSelectizeOptions(scope.options);
if(scope.config.setFocus){
selectize.focus();
}
//provides a way to access the selectize element from an
//angular controller
if (scope.config.onInitialize) {
scope.config.onInitialize(selectize);
}
scope.$watchCollection('options', setSelectizeOptions);
scope.$watch('ngModel', setSelectizeValue);
scope.$watch('ngDisabled', toggle);
};