Skip to content

Commit

Permalink
fix(module:drawer): fix nzContentParams definition error (#7668)
Browse files Browse the repository at this point in the history
- close #7620
  • Loading branch information
cipchk committed Dec 21, 2022
1 parent df35937 commit 0074013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/drawer/drawer.component.ts
Expand Up @@ -194,7 +194,7 @@ export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extend
previouslyFocusedElement?: HTMLElement;
placementChanging = false;
placementChangeTimeoutId = -1;
nzContentParams?: D; // only service
nzContentParams?: NzSafeAny; // only service
overlayRef?: OverlayRef | null;
portal?: TemplatePortal;
focusTrap?: FocusTrap;
Expand Down Expand Up @@ -419,7 +419,7 @@ export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extend
const componentPortal = new ComponentPortal<T>(this.nzContent, null, childInjector);
const componentRef = this.bodyPortalOutlet!.attachComponentPortal(componentPortal);
this.componentInstance = componentRef.instance;
Object.assign(componentRef.instance, this.nzContentParams);
Object.assign(componentRef.instance!, this.nzContentParams);
componentRef.changeDetectorRef.detectChanges();
}
}
Expand Down

0 comments on commit 0074013

Please sign in to comment.