diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts b/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts index c5e9c43176..e53cf01848 100644 --- a/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts +++ b/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts @@ -23,7 +23,7 @@ import {Component, Input, Output, EventEmitter, ViewChild, ComponentRef} from "@ import { PropertyFEModel, DerivedFEProperty, DerivedPropertyType } from "app/models"; import { PROPERTY_TYPES } from 'app/utils'; import { DataTypeService } from "../../../../services/data-type.service"; -import { trigger, state, style, transition, animate } from '@angular/animations'; +import { trigger, style, transition, animate } from '@angular/animations'; import {PropertiesUtils} from "../../../../pages/properties-assignment/services/properties.utils"; import {IUiElementChangeEvent} from "../../../ui/form-components/ui-element-base.component"; import {DynamicElementComponent} from "../../../ui/dynamic-element/dynamic-element.component"; @@ -44,6 +44,7 @@ export class DynamicPropertyComponent { nestedLevel: number; propertyTestsId: string; constraints:string[]; + checkboxDisabled: boolean = false; @Input() canBeDeclared: boolean; @Input() property: PropertyFEModel | DerivedFEProperty; @@ -148,6 +149,12 @@ export class DynamicPropertyComponent { onElementChanged = (event: IUiElementChangeEvent) => { this.property.updateValueObj(event.value, event.isValid); + if (this.property.hasValueObjChanged()) { + this.checkboxDisabled = true; + } + if (event.value === '' || event.value === null || event.value === undefined) { + this.checkboxDisabled = false; + } this.emitter.emit(); }; |