Skip to content

Commit 579d33d

Browse files
author
asiacomeau
authored
Merge pull request #1 from Mixpo/bug/PV5-256
ui-select - fix resize when element not on DOM.
2 parents 00d676d + dd4c4ab commit 579d33d

File tree

9 files changed

+31
-120
lines changed

9 files changed

+31
-120
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
/.idea
55
/.tmp
66
.DS_Store
7+
npm-debug.log
8+
package-lock.json

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ $ bower install angular-ui-select
3737

3838
### Prepare your environment
3939
* Install [Node.js](http://nodejs.org/) and NPM (should come with)
40+
* Use something pre-node 7. Like 6.x or earlier.
4041
* Install global dev dependencies: `npm install -g gulp`
4142
* Install local dev dependencies: `npm install` in repository directory
4243

dist/select.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.19.6 - 2018-01-04T19:53:46.538Z
4+
* Version: 0.19.6 - 2018-01-10T19:40:15.878Z
55
* License: MIT
66
*/
77

dist/select.js

Lines changed: 15 additions & 9 deletions
Large diffs are not rendered by default.

dist/select.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm-debug.log

Lines changed: 0 additions & 104 deletions
This file was deleted.

src/uiSelectController.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ uis.controller('uiSelectCtrl',
430430
ctrl.close(skipFocusser);
431431
return;
432432
}
433-
}
433+
}
434434
_resetSearchInput();
435435
$scope.$broadcast('uis:select', item);
436436

@@ -553,6 +553,12 @@ uis.controller('uiSelectCtrl',
553553
};
554554

555555
ctrl.searchInput.css('width', '10px');
556+
557+
// For select boxes hidden by angular, which are not on the DOM
558+
if (!container) {
559+
return;
560+
}
561+
556562
$timeout(function() { //Give tags time to render correctly
557563
if (sizeWatch === null && !updateIfVisible(calculateContainerWidth())) {
558564
sizeWatch = $scope.$watch(function() {

0 commit comments

Comments
 (0)