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

Commit 86e4a82

Browse files
committed
chore(changelog): updated changelog for 0.14.1
1 parent 2cc9e23 commit 86e4a82

File tree

6 files changed

+40
-8
lines changed

6 files changed

+40
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<a name="0.14.1"></a>
2+
## [0.14.1](https://github.com/angular-ui/ui-select/compare/v0.14.1...v0.14.1) (2016-01-27)
3+
4+
5+
6+
17
<a name="0.14.0"></a>
28
# [0.14.0](https://github.com/angular-ui/ui-select/compare/v0.13.3...v0.14.0) (2016-01-25)
39

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.14.0 - 2016-01-27T20:50:38.891Z
4+
* Version: 0.14.1 - 2016-01-27T22:27:00.588Z
55
* License: MIT
66
*/
77

dist/select.js

Lines changed: 29 additions & 3 deletions
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.14.0 - 2016-01-27T20:50:38.779Z
4+
* Version: 0.14.1 - 2016-01-27T22:27:00.452Z
55
* License: MIT
66
*/
77

@@ -315,7 +315,9 @@ uis.controller('uiSelectCtrl',
315315
ctrl.search = EMPTY_SEARCH;
316316
//reset activeIndex
317317
if (ctrl.selected && ctrl.items.length && !ctrl.multiple) {
318-
ctrl.activeIndex = ctrl.items.indexOf(ctrl.selected);
318+
ctrl.activeIndex = ctrl.items.findIndex(function(item){
319+
return angular.equals(this, item);
320+
}, ctrl.selected);
319321
}
320322
}
321323
}
@@ -508,7 +510,7 @@ uis.controller('uiSelectCtrl',
508510
return false;
509511
}
510512
var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]);
511-
var isActive = itemIndex === ctrl.activeIndex;
513+
var isActive = itemIndex == ctrl.activeIndex;
512514

513515
if ( !isActive || ( itemIndex < 0 && ctrl.taggingLabel !== false ) ||( itemIndex < 0 && ctrl.taggingLabel === false) ) {
514516
return false;
@@ -823,6 +825,30 @@ uis.controller('uiSelectCtrl',
823825

824826
}]);
825827

828+
// Array findIndex polyfill (source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex#Polyfill)
829+
if (!Array.prototype.findIndex) {
830+
Array.prototype.findIndex = function(predicate) {
831+
if (this === null) {
832+
throw new TypeError('Array.prototype.findIndex called on null or undefined');
833+
}
834+
if (typeof predicate !== 'function') {
835+
throw new TypeError('predicate must be a function');
836+
}
837+
var list = Object(this);
838+
var length = list.length >>> 0;
839+
var thisArg = arguments[1];
840+
var value;
841+
842+
for (var i = 0; i < length; i++) {
843+
value = list[i];
844+
if (predicate.call(thisArg, value, i, list)) {
845+
return i;
846+
}
847+
}
848+
return -1;
849+
};
850+
}
851+
826852
uis.directive('uiSelect',
827853
['$document', 'uiSelectConfig', 'uiSelectMinErr', 'uisOffset', '$compile', '$parse', '$timeout',
828854
function($document, uiSelectConfig, uiSelectMinErr, uisOffset, $compile, $parse, $timeout) {

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: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
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.14.0",
9+
"version": "0.14.1",
1010
"devDependencies": {
1111
"bower": "~1.3",
1212
"conventional-changelog": "^0.5.3",

0 commit comments

Comments
 (0)