@gravitee/ui-particles-angular 7.37.0 → 7.37.1

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.
@@ -3392,6 +3392,14 @@ class GioFormJsonSchemaComponent {
3392
3392
  this.ngControl?.control?.addAsyncValidators(() => {
3393
3393
  return this.isValid$.pipe(take(1), map(isValid => (isValid ? null : { invalid: true })), takeUntil(this.unsubscribe$));
3394
3394
  });
3395
+ // Init control value with default value without emit event
3396
+ this.formGroup.valueChanges.pipe(take(1), takeUntil(this.unsubscribe$)).subscribe(value => {
3397
+ this.ngControl?.control?.reset(value, { emitEvent: false });
3398
+ this.changeDetectorRef.markForCheck();
3399
+ this.changeDetectorRef.detectChanges();
3400
+ });
3401
+ this.changeDetectorRef.markForCheck();
3402
+ this.changeDetectorRef.detectChanges();
3395
3403
  // Subscribe to state changes to manage touches, status and value
3396
3404
  this.stateChanges$
3397
3405
  .pipe(tap(() => {
@@ -3429,10 +3437,6 @@ class GioFormJsonSchemaComponent {
3429
3437
  });
3430
3438
  }
3431
3439
  ngAfterViewInit() {
3432
- // Init control value with default value without emit event
3433
- this.ngControl?.control?.setValue(this.formGroup.value, { emitEvent: false });
3434
- this.changeDetectorRef.markForCheck();
3435
- this.changeDetectorRef.detectChanges();
3436
3440
  // Group all valueChanges events emit by formly in a single one
3437
3441
  merge(this.formGroup.statusChanges, this.formGroup.valueChanges)
3438
3442
  .pipe(