|
6 | 6 | import { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y'; |
7 | 7 | import { Direction, Directionality } from '@angular/cdk/bidi'; |
8 | 8 | import { ESCAPE } from '@angular/cdk/keycodes'; |
9 | | -import { Overlay, OverlayConfig, OverlayKeyboardDispatcher, OverlayRef } from '@angular/cdk/overlay'; |
| 9 | +import { CdkScrollable, Overlay, OverlayConfig, OverlayKeyboardDispatcher, OverlayRef } from '@angular/cdk/overlay'; |
10 | 10 | import { CdkPortalOutlet, ComponentPortal, PortalModule, TemplatePortal } from '@angular/cdk/portal'; |
11 | 11 | import { DOCUMENT, NgStyle, NgTemplateOutlet } from '@angular/common'; |
12 | 12 | import { |
@@ -118,7 +118,7 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer'; |
118 | 118 | } |
119 | 119 | </div> |
120 | 120 | } |
121 | | - <div class="ant-drawer-body" [ngStyle]="nzBodyStyle"> |
| 121 | + <div class="ant-drawer-body" [ngStyle]="nzBodyStyle" cdkScrollable> |
122 | 122 | <ng-template cdkPortalOutlet /> |
123 | 123 | @if (nzContent) { |
124 | 124 | @if (isNzContentTemplateRef) { |
@@ -146,7 +146,15 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer'; |
146 | 146 | preserveWhitespaces: false, |
147 | 147 | changeDetection: ChangeDetectionStrategy.OnPush, |
148 | 148 | animations: [drawerMaskMotion], |
149 | | - imports: [NzNoAnimationDirective, NgStyle, NzOutletModule, NzIconModule, PortalModule, NgTemplateOutlet], |
| 149 | + imports: [ |
| 150 | + NzNoAnimationDirective, |
| 151 | + NgStyle, |
| 152 | + NzOutletModule, |
| 153 | + NzIconModule, |
| 154 | + PortalModule, |
| 155 | + NgTemplateOutlet, |
| 156 | + CdkScrollable |
| 157 | + ], |
150 | 158 | standalone: true |
151 | 159 | }) |
152 | 160 | export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extends Partial<T> = NzSafeAny> |
|
0 commit comments