Skip to content

Commit f131140

Browse files
amcdnlpgrm
authored andcommitted
Fixes angular-ui#1208 matching and hardcoded value
1 parent 5b4d3aa commit f131140

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/uiSelectController.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,11 @@ uis.controller('uiSelectCtrl',
164164

165165
//When an object is used as source, we better create an array and use it as 'source'
166166
var createArrayFromObject = function(){
167-
$scope.$uisSource = Object.keys(originalSource($scope)).map(function(v){
167+
var origSrc = originalSource($scope);
168+
$scope.$uisSource = Object.keys(origSrc).map(function(v){
168169
var result = {};
169170
result[ctrl.parserResult.keyName] = v;
170-
result.value = $scope.peopleObj[v];
171+
result.value = origSrc[v];
171172
return result;
172173
});
173174
};

src/uisRepeatParserService.js

Lines changed: 1 addition & 1 deletion
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)