angular-selectize icon indicating copy to clipboard operation
angular-selectize copied to clipboard

closeAfterSelect functionality is broken when using multiselect

Open lafriks opened this issue 9 years ago • 1 comments

It is because isSameValue function is not validating arrays correctly

function isSameValue() {
   return (config.maxItems == 1 && selectize.items.length > 0 ? selectize.items[0] : selectize.items) == scope.ngModel;
}

Should be changed to:

function isSameValue() {
    return angular.equals((config.maxItems == 1 && selectize.items.length > 0 ? selectize.items[0] : selectize.items), scope.ngModel);
}

lafriks avatar Jan 29 '16 11:01 lafriks

function isSameValue() { return (config.maxItems == 1 && selectize.items.length > 0 ? selectize.items[0] : selectize.items) == scope.ngModel; }

where can I find this function?

moonlitdelight avatar Jan 25 '17 19:01 moonlitdelight