Skip to content

Commit 0074013

Browse files
authored
fix(module:drawer): fix nzContentParams definition error (#7668)
- close #7620
1 parent df35937 commit 0074013

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎components/drawer/drawer.component.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extend
194194
previouslyFocusedElement?: HTMLElement;
195195
placementChanging = false;
196196
placementChangeTimeoutId = -1;
197-
nzContentParams?: D; // only service
197+
nzContentParams?: NzSafeAny; // only service
198198
overlayRef?: OverlayRef | null;
199199
portal?: TemplatePortal;
200200
focusTrap?: FocusTrap;
@@ -419,7 +419,7 @@ export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extend
419419
const componentPortal = new ComponentPortal<T>(this.nzContent, null, childInjector);
420420
const componentRef = this.bodyPortalOutlet!.attachComponentPortal(componentPortal);
421421
this.componentInstance = componentRef.instance;
422-
Object.assign(componentRef.instance, this.nzContentParams);
422+
Object.assign(componentRef.instance!, this.nzContentParams);
423423
componentRef.changeDetectorRef.detectChanges();
424424
}
425425
}

0 commit comments

Comments
 (0)