Skip to content

Commit 09a8184

Browse files
dimircpgrm
authored andcommitted
chore(build): v0.13.1
1 parent f176510 commit 09a8184

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui-select",
3-
"version": "0.13.0",
3+
"version": "0.13.1",
44
"homepage": "https://github.com/angular-ui/ui-select",
55
"authors": [
66
"AngularUI"

dist/select.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ uis.controller('uiSelectCtrl',
416416
$scope.$uisSource = Object.keys(originalSource($scope)).map(function(v){
417417
var result = {};
418418
result[ctrl.parserResult.keyName] = v;
419-
result.value = $scope[ctrl.parserResult.sourceName][v];
419+
result.value = $scope.peopleObj[v];
420420
return result;
421421
});
422422
};
@@ -430,7 +430,6 @@ uis.controller('uiSelectCtrl',
430430
}
431431

432432
ctrl.refreshItems = function (data){
433-
$scope.calculateDropdownPos();
434433
data = data || ctrl.parserResult.source($scope);
435434
var selectedItems = ctrl.selected;
436435
//TODO should implement for single mode removeSelected
@@ -1911,8 +1910,22 @@ uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinE
19111910
self.parse = function(expression) {
19121911

19131912

1914-
//0000000000000000000000000000000000011111111100000000000000022222222222222003333333333333333333333000044444444444444444400000000000000005555500000666666666666600000000000000000000007777777770000000
1915-
var match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\w]+)\s*(|\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
1913+
var match;
1914+
var isObjectCollection = /\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)/.test(expression);
1915+
// If an array is used as collection
1916+
1917+
// if (isObjectCollection){
1918+
//00000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000556666660000077777777777755000000000000000000000088888880000000
1919+
match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(([\w]+)?\s*(|\s*[\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
1920+
1921+
// 1 Alias
1922+
// 2 Item
1923+
// 3 Key on (key,value)
1924+
// 4 Value on (key,value)
1925+
// 5 Collection expresion (only used when using an array collection)
1926+
// 6 Object that will be converted to Array when using (key,value) syntax
1927+
// 7 Filters that will be applied to #6 when using (key,value) syntax
1928+
// 8 Track by
19161929

19171930
if (!match) {
19181931
throw uiSelectMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",
@@ -1926,10 +1939,10 @@ uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinE
19261939
return {
19271940
itemName: match[4] || match[2], // (lhs) Left-hand side,
19281941
keyName: match[3], //for (key, value) syntax
1929-
source: $parse(!match[3] ? match[5] + (match[6] || ''): match[5]), //concat source with filters if its an array
1930-
sourceName: match[5],
1931-
filters: match[6],
1932-
trackByExp: match[7],
1942+
source: $parse(!match[3] ? match[5] : match[6]),
1943+
sourceName: match[6],
1944+
filters: match[7],
1945+
trackByExp: match[8],
19331946
modelMapper: $parse(match[1] || match[4] || match[2]),
19341947
repeatExpression: function (grouped) {
19351948
var expression = this.itemName + ' in ' + (grouped ? '$group.items' : '$select.items');

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.13.0",
9+
"version": "0.13.1",
1010
"devDependencies": {
1111
"bower": "~1.3",
1212
"conventional-changelog": "^0.5.3",

0 commit comments

Comments
 (0)