mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 13:11:19 -03:30
Fix form field lookup by populating the field name
This commit is contained in:
parent
56e9d7b8e2
commit
7965f9df6c
@ -29,10 +29,8 @@ export default ['templateUrl', function(templateUrl) {
|
||||
$scope.init = function() {
|
||||
let list = $scope.list;
|
||||
if($state.params.selected) {
|
||||
$scope.currentSelection = {
|
||||
name: null,
|
||||
id: parseInt($state.params.selected)
|
||||
};
|
||||
let selection = $scope[list.name].find(({id}) => id === parseInt($state.params.selected));
|
||||
$scope.currentSelection = _.pick(selection, 'id', 'name');
|
||||
}
|
||||
$scope.$watch(list.name, function(){
|
||||
selectRowIfPresent();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user