Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 5c8cf86

Browse files
author
Bogdan Alexe
committed
fix: search input width resizing
Fixed an issue introduced by d78ba5f The watcher was called only once since `angular.noop` will always return `undefined`. Fixed this by calling the resize function on each $digest. Closes #1618 Closes #1617 Closes #1575
1 parent 9d29307 commit 5c8cf86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uiSelectController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ uis.controller('uiSelectCtrl',
471471
ctrl.searchInput.css('width', '10px');
472472
$timeout(function() { //Give tags time to render correctly
473473
if (sizeWatch === null && !updateIfVisible(calculateContainerWidth())) {
474-
sizeWatch = $scope.$watch(angular.noop, function() {
474+
sizeWatch = $scope.$watch(function() {
475475
if (!updaterScheduled) {
476476
updaterScheduled = true;
477477
$scope.$$postDigest(function() {
@@ -482,7 +482,7 @@ uis.controller('uiSelectCtrl',
482482
}
483483
});
484484
}
485-
});
485+
}, angular.noop);
486486
}
487487
});
488488
};

0 commit comments

Comments
 (0)