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

Commit

Permalink
fix: search input width resizing
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Bogdan Alexe committed May 31, 2016
1 parent 9d29307 commit 5c8cf86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uiSelectController.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ uis.controller('uiSelectCtrl',
ctrl.searchInput.css('width', '10px');
$timeout(function() { //Give tags time to render correctly
if (sizeWatch === null && !updateIfVisible(calculateContainerWidth())) {
sizeWatch = $scope.$watch(angular.noop, function() {
sizeWatch = $scope.$watch(function() {
if (!updaterScheduled) {
updaterScheduled = true;
$scope.$$postDigest(function() {
Expand All @@ -482,7 +482,7 @@ uis.controller('uiSelectCtrl',
}
});
}
});
}, angular.noop);
}
});
};
Expand Down

0 comments on commit 5c8cf86

Please sign in to comment.