diff --git a/bower.json b/bower.json index fee420f..9180bd6 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-selector", - "version": "0.6.3", + "version": "0.7.0", "authors": [ "Indri Muska " ], diff --git a/dist/angular-selector.js b/dist/angular-selector.js index 412e675..ed1bcb7 100644 --- a/dist/angular-selector.js +++ b/dist/angular-selector.js @@ -29,6 +29,7 @@ options: '=?', rtl: '=?', api: '=?', + change: '&?', remote: '=?', remoteParam: '@?', removeButton: '=?', @@ -359,6 +360,10 @@ scope.$watch('selectedValues', function (newValue, oldValue) { if (angular.equals(newValue, oldValue)) return; scope.updateValue(); + if (angular.isFunction(scope.change)) + scope.change(scope.multiple + ? { newValue: newValue, oldValue: oldValue } + : { newValue: newValue[0], oldValue: oldValue[0] }); }, true); scope.$watch('options', function (newValue, oldValue) { if (angular.equals(newValue, oldValue) || scope.remote) return; @@ -445,8 +450,6 @@ '
' + - '' + '