mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Merge pull request #396 from marshmalien/fix/7591-quirky-lookup-modals
Fix form field lookup by populating the field name
This commit is contained in:
@@ -29,10 +29,8 @@ export default ['templateUrl', function(templateUrl) {
|
|||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
let list = $scope.list;
|
let list = $scope.list;
|
||||||
if($state.params.selected) {
|
if($state.params.selected) {
|
||||||
$scope.currentSelection = {
|
let selection = $scope[list.name].find(({id}) => id === parseInt($state.params.selected));
|
||||||
name: null,
|
$scope.currentSelection = _.pick(selection, 'id', 'name');
|
||||||
id: parseInt($state.params.selected)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
$scope.$watch(list.name, function(){
|
$scope.$watch(list.name, function(){
|
||||||
selectRowIfPresent();
|
selectRowIfPresent();
|
||||||
|
|||||||
Reference in New Issue
Block a user