Closed
Description
Setting an onChange config option has no effect.
Could be fixed by adding a line to selectize.js config.onChange:
config.onChange = function(value){
if( !angular.equals(selectize.items, scope.ngModel) )
scope.$evalAsync(function(){
var value = angular.copy(selectize.items);
if (config.maxItems == 1) {
value = value[0]
}
modelCtrl.$setViewValue( value );
});
scope.config.onChange(value);
}
For some reason my onChange function now gets called twice. Better than not at all though....
Metadata
Metadata
Assignees
Labels
No labels