diff options
author | 2023-02-23 10:46:25 +0000 | |
---|---|---|
committer | 2023-03-13 12:05:26 +0000 | |
commit | 7193e96b30ccaa4ed06c80a4861c91d341e0d910 (patch) | |
tree | d4b3f0bc7dde9d8ab9c2dbab9dabb6b9008feb32 /catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts | |
parent | 532cb373b22b5684cbe6ea003d749560f051be08 (diff) |
Setting Tosca Function on top of unsaved value causes problems
Issue-ID: SDC-4405
Signed-off-by: franciscovila <javier.paradela.vila@est.tech>
Change-Id: I688fafa39338900f6248213c27975ced113f5ee9
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(); }; |