Skip to content

Commit 105c33d

Browse files
amcdnlpgrm
authored andcommitted
Fixes angular-ui#1208 matching and hardcoded value
1 parent 853bd60 commit 105c33d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/uiSelectController.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ uis.controller('uiSelectCtrl',
152152

153153
//When an object is used as source, we better create an array and use it as 'source'
154154
var createArrayFromObject = function(){
155-
$scope.$uisSource = Object.keys(originalSource($scope)).map(function(v){
155+
var origSrc = originalSource($scope);
156+
$scope.$uisSource = Object.keys(origSrc).map(function(v){
156157
var result = {};
157158
result[ctrl.parserResult.keyName] = v;
158-
result.value = $scope.peopleObj[v];
159+
result.value = origSrc[v];
159160
return result;
160161
});
161162
};

src/uisRepeatParserService.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinE
2727

2828
// if (isObjectCollection){
2929
//00000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000556666660000077777777777755000000000000000000000088888880000000
30-
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*$/);
30+
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*$/);
3131

3232
// 1 Alias
3333
// 2 Item

0 commit comments

Comments
 (0)