cat-qw-lib 0.43.38 → 0.43.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -674,11 +674,6 @@ class BaseControlComponent {
|
|
|
674
674
|
this.baseStore.setIsFormSubmitted(false);
|
|
675
675
|
}
|
|
676
676
|
});
|
|
677
|
-
console.log("oninit record=>", this.record);
|
|
678
|
-
if (this.record) {
|
|
679
|
-
this.initialRecord = structuredClone(this.record); // Reset initial state after saving
|
|
680
|
-
console.log("oninit initialRecord=>", this.initialRecord);
|
|
681
|
-
}
|
|
682
677
|
this.formStateService.selectIsFormNavigating()
|
|
683
678
|
.pipe(takeUntil(this.destroy$))
|
|
684
679
|
.subscribe((res) => {
|
|
@@ -687,12 +682,16 @@ class BaseControlComponent {
|
|
|
687
682
|
}
|
|
688
683
|
});
|
|
689
684
|
}
|
|
690
|
-
ngOnChanges() {
|
|
685
|
+
ngOnChanges(changes) {
|
|
691
686
|
if (this.store) {
|
|
692
687
|
this.query = new BaseQuery(this.store);
|
|
693
688
|
}
|
|
694
|
-
|
|
695
|
-
|
|
689
|
+
if (changes['record']) {
|
|
690
|
+
// Only update initialRecord when a new record is received from the server
|
|
691
|
+
console.log("onchange record=>", this.record);
|
|
692
|
+
this.initialRecord = structuredClone(changes['record'].currentValue);
|
|
693
|
+
console.log("onchange initialRecord=>", this.initialRecord);
|
|
694
|
+
}
|
|
696
695
|
}
|
|
697
696
|
handleModelChange(event, valid, val) {
|
|
698
697
|
if (this.attributeModel?.name) {
|