@ngx-smz/core 21.0.4 → 21.0.5
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.
|
@@ -6262,6 +6262,7 @@ class FormGroupComponent {
|
|
|
6262
6262
|
// this.viewdata.isValid = this.viewdata.form.valid;
|
|
6263
6263
|
const runCustomFunctionsOnLoad = this.config.behaviors?.runCustomFunctionsOnLoad ?? false;
|
|
6264
6264
|
let isStatusChangesEmitted = false;
|
|
6265
|
+
let data = null;
|
|
6265
6266
|
// Esse if garante a execução do custom behaviour na primeira inicialização, já que com o adiamento feito no status changes abaixo,
|
|
6266
6267
|
// ele não passa mais por la
|
|
6267
6268
|
if (runCustomFunctionsOnLoad) {
|
|
@@ -6271,7 +6272,18 @@ class FormGroupComponent {
|
|
|
6271
6272
|
else {
|
|
6272
6273
|
if (!this.config.behaviors?.skipEmitChangesOnLoad) {
|
|
6273
6274
|
isStatusChangesEmitted = true;
|
|
6274
|
-
this.
|
|
6275
|
+
data = this.getData();
|
|
6276
|
+
this.statusChanges.emit(data);
|
|
6277
|
+
}
|
|
6278
|
+
}
|
|
6279
|
+
if (this.config.behaviors?.emitAllOutputsOnLoad) {
|
|
6280
|
+
if (data == null) {
|
|
6281
|
+
data = this.getData();
|
|
6282
|
+
}
|
|
6283
|
+
this.initialStateChanged.emit(data);
|
|
6284
|
+
this.previousStateChanged.emit(data);
|
|
6285
|
+
if (!isStatusChangesEmitted) {
|
|
6286
|
+
this.statusChanges.emit(data);
|
|
6275
6287
|
}
|
|
6276
6288
|
}
|
|
6277
6289
|
this.callVisibilityFunctions();
|
|
@@ -6289,16 +6301,6 @@ class FormGroupComponent {
|
|
|
6289
6301
|
});
|
|
6290
6302
|
this.fixRadioBug();
|
|
6291
6303
|
this.resetState();
|
|
6292
|
-
if (this.config.behaviors?.emitAllOutputsOnLoad) {
|
|
6293
|
-
setTimeout(() => {
|
|
6294
|
-
const data = this.getData();
|
|
6295
|
-
this.initialStateChanged.emit(data);
|
|
6296
|
-
this.previousStateChanged.emit(data);
|
|
6297
|
-
if (!isStatusChangesEmitted) {
|
|
6298
|
-
this.statusChanges.emit(data);
|
|
6299
|
-
}
|
|
6300
|
-
}, 0);
|
|
6301
|
-
}
|
|
6302
6304
|
}, 0);
|
|
6303
6305
|
}, 0);
|
|
6304
6306
|
}, 0);
|