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

Commit b044b41

Browse files
committed
chore(build): v0.8.3
1 parent 331f2a9 commit b044b41

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

Diff for: bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui-select",
3-
"version": "0.8.2",
3+
"version": "0.8.3",
44
"homepage": "https://github.com/angular-ui/ui-select",
55
"authors": [
66
"AngularUI"

Diff for: dist/select.css

+1-1
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.8.2 - 2014-10-09T23:29:49.716Z
4+
* Version: 0.8.3 - 2014-10-14T18:22:05.435Z
55
* License: MIT
66
*/
77

Diff for: dist/select.js

+21-3
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.8.2 - 2014-10-09T23:29:49.713Z
4+
* Version: 0.8.3 - 2014-10-14T18:22:05.432Z
55
* License: MIT
66
*/
77

@@ -396,14 +396,28 @@
396396
return ctrl.placeholder;
397397
};
398398

399+
var containerSizeWatch;
399400
ctrl.sizeSearchInput = function(){
400401
var input = _searchInput[0],
401402
container = _searchInput.parent().parent()[0];
402403
_searchInput.css('width','10px');
403-
$timeout(function(){
404+
var calculate = function(){
404405
var newWidth = container.clientWidth - input.offsetLeft - 10;
405406
if(newWidth < 50) newWidth = container.clientWidth;
406407
_searchInput.css('width',newWidth+'px');
408+
};
409+
$timeout(function(){ //Give tags time to render correctly
410+
if (container.clientWidth === 0 && !containerSizeWatch){
411+
containerSizeWatch = $scope.$watch(function(){ return container.clientWidth;}, function(newValue){
412+
if (newValue !== 0){
413+
calculate();
414+
containerSizeWatch();
415+
containerSizeWatch = null;
416+
}
417+
});
418+
}else if (!containerSizeWatch) {
419+
calculate();
420+
}
407421
}, 0, false);
408422
};
409423

@@ -757,6 +771,10 @@
757771
});
758772

759773
if ($select.multiple){
774+
scope.$watchCollection(function(){ return ngModel.$modelValue; }, function(newValue, oldValue) {
775+
if (oldValue != newValue)
776+
ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters
777+
});
760778
scope.$watchCollection('$select.selected', function() {
761779
ngModel.$setViewValue(Date.now()); //Set timestamp as a unique string to force changes
762780
});
@@ -927,7 +945,7 @@
927945
});
928946

929947
if($select.multiple){
930-
$select.sizeSearchInput();
948+
$select.sizeSearchInput();
931949
}
932950

933951
}

Diff for: dist/select.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/select.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"repository": {
77
"url": "git://github.com/angular-ui/ui-select.git"
88
},
9-
"version": "0.8.2",
9+
"version": "0.8.3",
1010
"devDependencies": {
1111
"bower": "~1.3",
1212
"del": "~0.1.1",

0 commit comments

Comments
 (0)