mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 05:31:22 -03: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:
commit
7a2a4cc4a9
@ -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