Skip to content

Commit

Permalink
fix value update in readonly form field wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Wagei committed Oct 17, 2024
1 parent c6f9c88 commit f0da065
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ import {Subscription} from 'rxjs';
selector: 'mad-readonly-form-field-wrapper',
templateUrl: './readonly-form-field-wrapper.component.html',
styleUrls: ['./readonly-form-field-wrapper.component.css'],
viewProviders: [{provide: ControlContainer, useExisting: FormGroupDirective}],
viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
standalone: true,
imports: [NgIf, ReadOnlyFormFieldComponent, ObserversModule],
})
export class ReadOnlyFormFieldWrapperComponent implements OnInit, AfterViewInit, OnChanges, AfterViewChecked, OnDestroy {
@ViewChild('contentWrapper', {static: false})
@ViewChild('contentWrapper', { static: false })
originalContent: ElementRef;
@ViewChild('readOnlyContentWrapper', {static: false})
@ViewChild('readOnlyContentWrapper', { static: false })
readOnlyContentWrapper: ElementRef;

/**
Expand Down Expand Up @@ -102,8 +102,7 @@ export class ReadOnlyFormFieldWrapperComponent implements OnInit, AfterViewInit,
constructor(
private changeDetector: ChangeDetectorRef,
private rootFormGroup: FormGroupDirective,
) {
}
) {}

ngOnInit(): void {
this.doRendering();
Expand All @@ -114,8 +113,7 @@ export class ReadOnlyFormFieldWrapperComponent implements OnInit, AfterViewInit,
this.extractValue();
}

ngAfterViewChecked(): void {
}
ngAfterViewChecked(): void {}

ngOnDestroy() {
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
Expand Down

0 comments on commit f0da065

Please sign in to comment.