@fuentis/phoenix-ui 0.0.9-alpha.524 → 0.0.9-alpha.526
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.
|
@@ -3903,11 +3903,8 @@ class MetaFormAbstract {
|
|
|
3903
3903
|
if (changes['metaFormControls'] ||
|
|
3904
3904
|
changes['metaFormValues'] ||
|
|
3905
3905
|
changes['disableForm']) {
|
|
3906
|
-
if (!this.metaForm)
|
|
3907
|
-
|
|
3908
|
-
this.metaForm = this.fb.group({});
|
|
3909
|
-
this.rewireFormSubscription();
|
|
3910
|
-
}
|
|
3906
|
+
if (!this.metaForm)
|
|
3907
|
+
return;
|
|
3911
3908
|
this.syncForm();
|
|
3912
3909
|
}
|
|
3913
3910
|
}
|
|
@@ -3919,8 +3916,7 @@ class MetaFormAbstract {
|
|
|
3919
3916
|
if (controls)
|
|
3920
3917
|
this.metaFormControls = controls;
|
|
3921
3918
|
if (!this.metaForm) {
|
|
3922
|
-
|
|
3923
|
-
this.rewireFormSubscription();
|
|
3919
|
+
throw new Error('[MetaFormAbstract] metaForm input is required. Parent must pass [metaForm].');
|
|
3924
3920
|
}
|
|
3925
3921
|
this.syncForm();
|
|
3926
3922
|
}
|
|
@@ -3949,10 +3945,12 @@ class MetaFormAbstract {
|
|
|
3949
3945
|
this.metaForm.enable({ emitEvent: false });
|
|
3950
3946
|
// 4) Bind dependencies if needed (rebind when metadata changes)
|
|
3951
3947
|
this.bindDependenciesIfNeeded(flatControls);
|
|
3952
|
-
// 5)
|
|
3953
|
-
this.metaForm.updateValueAndValidity({ emitEvent: false });
|
|
3954
|
-
// 6) Notify that the form is ready
|
|
3948
|
+
// 5) Notify that the form is ready
|
|
3955
3949
|
this.metaService.setFormBuildCompletition(true);
|
|
3950
|
+
// 6) Emit one stable status update AFTER the current CD cycle
|
|
3951
|
+
queueMicrotask(() => {
|
|
3952
|
+
this.metaForm.updateValueAndValidity({ emitEvent: true });
|
|
3953
|
+
});
|
|
3956
3954
|
}
|
|
3957
3955
|
/**
|
|
3958
3956
|
* Supports both:
|
|
@@ -4066,7 +4064,9 @@ class MetaFormAbstract {
|
|
|
4066
4064
|
emitEvent: false,
|
|
4067
4065
|
});
|
|
4068
4066
|
// Recompute the parent form validity so UI can enable Save immediately.
|
|
4069
|
-
|
|
4067
|
+
queueMicrotask(() => {
|
|
4068
|
+
this.metaForm.updateValueAndValidity({ emitEvent: true });
|
|
4069
|
+
});
|
|
4070
4070
|
});
|
|
4071
4071
|
this.clearServerErrorSubs.set(key, sub);
|
|
4072
4072
|
}
|