From a00c24b2c17e594ba195ce1c0877d4a573036d60 Mon Sep 17 00:00:00 2001 From: Austin McDaniel Date: Fri, 9 Oct 2015 11:25:10 -0400 Subject: [PATCH] Fixes #1208 matching and hardcoded value --- src/uiSelectController.js | 5 +++-- src/uisRepeatParserService.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/uiSelectController.js b/src/uiSelectController.js index 65d871ac7..1afccb72e 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -152,10 +152,11 @@ uis.controller('uiSelectCtrl', //When an object is used as source, we better create an array and use it as 'source' var createArrayFromObject = function(){ - $scope.$uisSource = Object.keys(originalSource($scope)).map(function(v){ + var origSrc = originalSource($scope); + $scope.$uisSource = Object.keys(origSrc).map(function(v){ var result = {}; result[ctrl.parserResult.keyName] = v; - result.value = $scope.peopleObj[v]; + result.value = origSrc[v]; return result; }); }; diff --git a/src/uisRepeatParserService.js b/src/uisRepeatParserService.js index ecbbb1117..5ee44bc72 100644 --- a/src/uisRepeatParserService.js +++ b/src/uisRepeatParserService.js @@ -27,7 +27,7 @@ uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinE // if (isObjectCollection){ //00000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000556666660000077777777777755000000000000000000000088888880000000 - 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*$/); + 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*$/); // 1 Alias // 2 Item