Browse Source

UI: Fix Data key use post processing function

pull/3141/head
Igor Kulikov 6 years ago
parent
commit
8f1f03bf67
  1. 3
      ui-ngx/src/app/modules/home/components/widget/data-key-config.component.ts

3
ui-ngx/src/app/modules/home/components/widget/data-key-config.component.ts

@ -171,6 +171,9 @@ export class DataKeyConfigComponent extends PageComponent implements OnInit, Con
writeValue(value: DataKey): void { writeValue(value: DataKey): void {
this.modelValue = value; this.modelValue = value;
if (this.modelValue.postFuncBody && this.modelValue.postFuncBody.length) {
this.modelValue.usePostProcessing = true;
}
this.dataKeyFormGroup.patchValue(this.modelValue, {emitEvent: false}); this.dataKeyFormGroup.patchValue(this.modelValue, {emitEvent: false});
this.dataKeyFormGroup.get('name').setValidators(this.modelValue.type !== DataKeyType.function ? [Validators.required] : []); this.dataKeyFormGroup.get('name').setValidators(this.modelValue.type !== DataKeyType.function ? [Validators.required] : []);
this.dataKeyFormGroup.get('name').updateValueAndValidity({emitEvent: false}); this.dataKeyFormGroup.get('name').updateValueAndValidity({emitEvent: false});

Loading…
Cancel
Save