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

Commit

Permalink
chore(build): v0.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dimirc committed Oct 14, 2014
1 parent 331f2a9 commit b044b41
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui-select",
"version": "0.8.2",
"version": "0.8.3",
"homepage": "https://github.com/angular-ui/ui-select",
"authors": [
"AngularUI"
Expand Down
2 changes: 1 addition & 1 deletion dist/select.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.8.2 - 2014-10-09T23:29:49.716Z
* Version: 0.8.3 - 2014-10-14T18:22:05.435Z
* License: MIT
*/

Expand Down
24 changes: 21 additions & 3 deletions dist/select.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.8.2 - 2014-10-09T23:29:49.713Z
* Version: 0.8.3 - 2014-10-14T18:22:05.432Z
* License: MIT
*/

Expand Down Expand Up @@ -396,14 +396,28 @@
return ctrl.placeholder;
};

var containerSizeWatch;
ctrl.sizeSearchInput = function(){
var input = _searchInput[0],
container = _searchInput.parent().parent()[0];
_searchInput.css('width','10px');
$timeout(function(){
var calculate = function(){
var newWidth = container.clientWidth - input.offsetLeft - 10;
if(newWidth < 50) newWidth = container.clientWidth;
_searchInput.css('width',newWidth+'px');
};
$timeout(function(){ //Give tags time to render correctly
if (container.clientWidth === 0 && !containerSizeWatch){
containerSizeWatch = $scope.$watch(function(){ return container.clientWidth;}, function(newValue){
if (newValue !== 0){
calculate();
containerSizeWatch();
containerSizeWatch = null;
}
});
}else if (!containerSizeWatch) {
calculate();
}
}, 0, false);
};

Expand Down Expand Up @@ -757,6 +771,10 @@
});

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

if($select.multiple){
$select.sizeSearchInput();
$select.sizeSearchInput();
}

}
Expand Down
2 changes: 1 addition & 1 deletion dist/select.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/select.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"repository": {
"url": "git://github.com/angular-ui/ui-select.git"
},
"version": "0.8.2",
"version": "0.8.3",
"devDependencies": {
"bower": "~1.3",
"del": "~0.1.1",
Expand Down

0 comments on commit b044b41

Please sign in to comment.