Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module:modal,drawer): secondary overlays not scrolling inside #8804

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5c11a42
fix(module:tabs): wrong cursor
ParsaArvanehPA Feb 1, 2024
aac33c4
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Feb 13, 2024
f7525f5
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Feb 19, 2024
8a974b9
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Feb 19, 2024
e5276bb
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Feb 20, 2024
0f989fe
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Feb 27, 2024
ec35a90
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Feb 28, 2024
6ec6fe1
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Mar 2, 2024
5d1e384
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Mar 24, 2024
d81339e
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Mar 24, 2024
2284767
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Apr 6, 2024
0ac094d
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Apr 23, 2024
59d40a5
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA May 12, 2024
82afabb
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Jul 14, 2024
11b7fc8
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Jul 17, 2024
8705669
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Aug 4, 2024
0e963ac
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Aug 12, 2024
2bb0cd9
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Sep 3, 2024
674a373
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Sep 8, 2024
124d3ac
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Sep 16, 2024
413ac69
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Sep 18, 2024
5bee081
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Sep 22, 2024
2569a26
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Sep 23, 2024
1e6cc5e
Merge branch 'NG-ZORRO:master' into master
ParsaArvanehPA Sep 28, 2024
e3ac1b8
fix(module:modal,drawer): secondary overlays not scrolling inside
ParsaArvanehPA Sep 28, 2024
7a8e100
fix(module:modal,drawer): secondary overlays not scrolling inside
ParsaArvanehPA Sep 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions components/drawer/drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';
import { Direction, Directionality } from '@angular/cdk/bidi';
import { ESCAPE } from '@angular/cdk/keycodes';
import { Overlay, OverlayConfig, OverlayKeyboardDispatcher, OverlayRef } from '@angular/cdk/overlay';
import { CdkScrollable, Overlay, OverlayConfig, OverlayKeyboardDispatcher, OverlayRef } from '@angular/cdk/overlay';
import { CdkPortalOutlet, ComponentPortal, PortalModule, TemplatePortal } from '@angular/cdk/portal';
import { DOCUMENT, NgStyle, NgTemplateOutlet } from '@angular/common';
import {
Expand Down Expand Up @@ -118,7 +118,7 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer';
}
</div>
}
<div class="ant-drawer-body" [ngStyle]="nzBodyStyle">
<div class="ant-drawer-body" [ngStyle]="nzBodyStyle" cdkScrollable>
<ng-template cdkPortalOutlet />
@if (nzContent) {
@if (isNzContentTemplateRef) {
Expand Down Expand Up @@ -146,7 +146,15 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer';
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [drawerMaskMotion],
imports: [NzNoAnimationDirective, NgStyle, NzOutletModule, NzIconModule, PortalModule, NgTemplateOutlet],
imports: [
NzNoAnimationDirective,
NgStyle,
NzOutletModule,
NzIconModule,
PortalModule,
NgTemplateOutlet,
CdkScrollable
],
standalone: true
})
export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extends Partial<T> = NzSafeAny>
Expand Down
2 changes: 2 additions & 0 deletions components/modal/modal-confirm-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/

import { CdkScrollable } from '@angular/cdk/overlay';
import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
import { NgClass, NgStyle } from '@angular/common';
import {
Expand Down Expand Up @@ -91,6 +92,7 @@ import { BaseModalContainerComponent } from './modal-container.directive';
</div>
</div>
`,
hostDirectives: [CdkScrollable],
animations: [nzModalAnimations.modalContainer],
// Using OnPush for modal caused footer can not to detect changes. we can fix it when 8.x.
changeDetection: ChangeDetectionStrategy.Default,
Expand Down
2 changes: 2 additions & 0 deletions components/modal/modal-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import { CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
import { CdkScrollable } from '@angular/cdk/overlay';
import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
import { NgClass, NgStyle } from '@angular/common';
import { ChangeDetectionStrategy, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
Expand All @@ -19,6 +20,7 @@ import { NzModalTitleComponent } from './modal-title.component';
@Component({
selector: 'nz-modal-container',
exportAs: 'nzModalContainer',
hostDirectives: [CdkScrollable],
template: `
<div
#modalElement
Expand Down