added isLoading disable form
This commit is contained in:
		
							parent
							
								
									a6a0c8dfc0
								
							
						
					
					
						commit
						b30329be98
					
				@ -97,6 +97,7 @@ export class CalculatedFieldDialogComponent extends DialogComponent<CalculatedFi
 | 
			
		||||
              private destroyRef: DestroyRef,
 | 
			
		||||
              private fb: FormBuilder) {
 | 
			
		||||
    super(store, router, dialogRef);
 | 
			
		||||
    this.observeIsLoading();
 | 
			
		||||
    this.applyDialogData();
 | 
			
		||||
    this.observeTypeChanges();
 | 
			
		||||
  }
 | 
			
		||||
@ -174,4 +175,16 @@ export class CalculatedFieldDialogComponent extends DialogComponent<CalculatedFi
 | 
			
		||||
      this.configFormGroup.get('expressionSCRIPT').enable({emitEvent: false});
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  private observeIsLoading(): void {
 | 
			
		||||
    this.isLoading$.pipe(takeUntilDestroyed()).subscribe(loading => {
 | 
			
		||||
      if (loading) {
 | 
			
		||||
        this.fieldFormGroup.disable({emitEvent: false});
 | 
			
		||||
      } else {
 | 
			
		||||
        this.fieldFormGroup.enable({emitEvent: false});
 | 
			
		||||
        this.toggleScopeByOutputType(this.outputFormGroup.get('type').value);
 | 
			
		||||
        this.toggleKeyByCalculatedFieldType(this.fieldFormGroup.get('type').value);
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user