@ngx-smz/core 21.0.2 → 21.0.3

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,7 +6262,6 @@ 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;
6266
6265
  // Esse if garante a execução do custom behaviour na primeira inicialização, já que com o adiamento feito no status changes abaixo,
6267
6266
  // ele não passa mais por la
6268
6267
  if (runCustomFunctionsOnLoad) {
@@ -6272,19 +6271,18 @@ class FormGroupComponent {
6272
6271
  else {
6273
6272
  if (!this.config.behaviors?.skipEmitChangesOnLoad) {
6274
6273
  isStatusChangesEmitted = true;
6275
- data = this.getData();
6276
- this.statusChanges.emit(data);
6274
+ this.statusChanges.emit(this.getData());
6277
6275
  }
6278
6276
  }
6279
6277
  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);
6287
- }
6278
+ setTimeout(() => {
6279
+ const data = this.getData();
6280
+ this.initialStateChanged.emit(data);
6281
+ this.previousStateChanged.emit(data);
6282
+ if (!isStatusChangesEmitted) {
6283
+ this.statusChanges.emit(data);
6284
+ }
6285
+ }, 0);
6288
6286
  }
6289
6287
  this.callVisibilityFunctions();
6290
6288
  this.callWarningFunctions();