mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Set lookup value changed from something to nothing to be null
This commit is contained in:
parent
f93506fe2c
commit
b7071a48c2
@ -32,7 +32,7 @@ function AtFormController (eventService, strings) {
|
||||
vm.setListeners();
|
||||
};
|
||||
|
||||
vm.register = (category, component, el) => {
|
||||
vm.register = (category, component, el) => {
|
||||
component.category = category;
|
||||
component.form = vm.state;
|
||||
|
||||
@ -66,7 +66,7 @@ function AtFormController (eventService, strings) {
|
||||
let data = vm.components
|
||||
.filter(component => component.category === 'input')
|
||||
.reduce((values, component) => {
|
||||
if (!component.state._value) {
|
||||
if (component.state._value === undefined) {
|
||||
return values;
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ function atInputLookupLink (scope, element, attrs, controllers) {
|
||||
inputController.init(scope, element, formController);
|
||||
}
|
||||
|
||||
function AtInputLookupController (baseInputController, $q, $state, $stateParams) {
|
||||
function AtInputLookupController (baseInputController, $q, $state) {
|
||||
let vm = this || {};
|
||||
|
||||
let scope;
|
||||
@ -75,13 +75,14 @@ function AtInputLookupController (baseInputController, $q, $state, $stateParams)
|
||||
|
||||
vm.resetDebounce = () => {
|
||||
clearTimeout(vm.debounce);
|
||||
vm.searchAfterDebounce();
|
||||
vm.searchAfterDebounce();
|
||||
};
|
||||
|
||||
vm.search = () => {
|
||||
scope.state._touched = true;
|
||||
|
||||
if (scope.state._displayValue === '' && !scope.state._required) {
|
||||
scope.state._value = null;
|
||||
return vm.check({ isValid: true });
|
||||
}
|
||||
|
||||
@ -116,8 +117,7 @@ function AtInputLookupController (baseInputController, $q, $state, $stateParams)
|
||||
AtInputLookupController.$inject = [
|
||||
'BaseInputController',
|
||||
'$q',
|
||||
'$state',
|
||||
'$stateParams'
|
||||
'$state'
|
||||
];
|
||||
|
||||
function atInputLookup (pathService) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user