Browse Source

UI: Optimize watchKeyChange in CF arguments

pull/14694/head
Vladyslav_Prykhodko 9 months ago
parent
commit
3a647f0037
  1. 6
      ui-ngx/src/app/modules/home/components/calculated-fields/components/calculated-field-arguments/calculated-field-argument-panel.component.ts

6
ui-ngx/src/app/modules/home/components/calculated-fields/components/calculated-field-arguments/calculated-field-argument-panel.component.ts

@ -259,7 +259,11 @@ export class CalculatedFieldArgumentPanelComponent implements OnInit, AfterViewI
};
}
if (!onInit) {
this.argumentFormGroup.get('refEntityKey').get('key').setValue('');
this.argumentFormGroup.get('refEntityKey').get('key').setValue('', {emitEvents: !this.watchKeyChange});
if (this.watchKeyChange && this.argumentFormGroup.get('argumentName').pristine) {
this.argumentFormGroup.get('argumentName').markAsUntouched({emitEvent: false});
this.argumentFormGroup.get('argumentName').setValue('', {emitEvent: false});
}
} else if (this.predefinedEntityFilter) {
entityFilter = this.predefinedEntityFilter;
}

Loading…
Cancel
Save