|
1 | 1 | /** |
2 | | - * semantic-ui-angular-jquery - 0.2.3 |
| 2 | + * semantic-ui-angular-jquery - 0.2.4 |
3 | 3 | * Angular Directives for Semantic UI |
4 | | - * |
| 4 | + * |
5 | 5 | * https://github.com/ClickerMonkey/SemanticUI-Angular |
6 | 6 | * Released under the MIT license. |
7 | 7 | * Copyright 2017 Philip Diffenderfer and contributors. |
@@ -228,34 +228,34 @@ angular.module('semantic-ui', [ |
228 | 228 |
|
229 | 229 | }, true ); |
230 | 230 | }, |
231 | | - watcher: function (scope, expression, func, context, force, equals) |
| 231 | + watcher: function (scope, expression, func, context, force, equals) |
232 | 232 | { |
233 | 233 | var currentValue = angular.copy(scope[expression]); |
234 | 234 |
|
235 | | - scope.$watch(expression, function (updated) |
| 235 | + scope.$watch(expression, function (updated) |
236 | 236 | { |
237 | | - if (expression != 'model' || !angular.equals(currentValue, updated)) |
| 237 | + if (expression != 'model' || !angular.equals(currentValue, updated)) |
238 | 238 | { |
239 | 239 | func.call(context, updated); |
240 | 240 | } |
241 | 241 |
|
242 | 242 | }, equals); |
243 | 243 |
|
244 | 244 | return { |
245 | | - set: function (value) |
| 245 | + set: function (value) |
246 | 246 | { |
247 | | - if (scope[expression] != value || force) |
| 247 | + if (scope[expression] != value || force) |
248 | 248 | { |
249 | | - scope.$evalAsync(function () |
| 249 | + scope.$evalAsync(function () |
250 | 250 | { |
251 | 251 | scope[expression] = value; |
252 | 252 | currentValue = angular.copy(scope[expression]); |
253 | 253 | }); |
254 | 254 | } |
255 | 255 | }, |
256 | | - update: function () |
| 256 | + update: function () |
257 | 257 | { |
258 | | - scope.$evalAsync(function () |
| 258 | + scope.$evalAsync(function () |
259 | 259 | { |
260 | 260 | }); |
261 | 261 | } |
@@ -1287,9 +1287,11 @@ angular.module('semantic-ui', [ |
1287 | 1287 | return function (scope, element, attributes) { |
1288 | 1288 | var applyValue = function (value) { |
1289 | 1289 | $timeout(function () { |
1290 | | - if (value == null) { |
| 1290 | + if (value === null) { |
1291 | 1291 | element.dropdown('clear'); |
1292 | | - } |
| 1292 | + } else if(value === false){ |
| 1293 | + // Do nothing |
| 1294 | + } |
1293 | 1295 | else if (element.dropdown('is multiple')) { |
1294 | 1296 | if (value instanceof Array) { |
1295 | 1297 | var translatedValue = []; |
|
0 commit comments