summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/models/properties-inputs/input-fe-model.ts')
-rw-r--r--catalog-ui/src/app/models/properties-inputs/input-fe-model.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts b/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts
index c349f41ea2..85c514bcbc 100644
--- a/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts
+++ b/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts
@@ -34,6 +34,7 @@ export class InputFEModel extends InputBEModel {
defaultValueObjOrig:any;
defaultValueObjIsChanged:boolean;
derivedDataType: DerivedPropertyType;
+ requiredOrig: boolean;
constructor(input?: InputBEModel) {
super(input);
@@ -47,6 +48,8 @@ export class InputFEModel extends InputBEModel {
this.derivedDataType = this.getDerivedPropertyType();
this.resetDefaultValueObjValidation();
this.updateDefaultValueObjOrig();
+
+ this.requiredOrig = this.required;
}
}
@@ -77,4 +80,11 @@ export class InputFEModel extends InputBEModel {
return !_.isEqual(this.defaultValueObj, this.defaultValueObjOrig);
}
+ hasRequiredChanged(): boolean {
+ return this.required !== this.requiredOrig;
+ }
+
+ hasChanged(): boolean {
+ return this.hasDefaultValueChanged() || this.hasRequiredChanged();
+ }
} \ No newline at end of file