Skip to content

Commit c4a62a8

Browse files
dolezaljancrisbeto
authored andcommitted
fix(material/dialog): MatDialog: change member _dialog (cdk) from private to protected (#28019) (#28020)
Having customized MatDialog allow to have customized cdk/dialog inside of it. (cherry picked from commit 238e978)
1 parent aebe796 commit c4a62a8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/material/dialog/dialog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class MatDialog implements OnDestroy {
8282
private readonly _openDialogsAtThisLevel: MatDialogRef<any>[] = [];
8383
private readonly _afterAllClosedAtThisLevel = new Subject<void>();
8484
private readonly _afterOpenedAtThisLevel = new Subject<MatDialogRef<any>>();
85-
private _dialog: Dialog;
85+
protected _dialog: Dialog;
8686
protected dialogConfigClass = MatDialogConfig;
8787

8888
private readonly _dialogRefConstructor: Type<MatDialogRef<any>>;

tools/public_api_guard/material/dialog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { ComponentFactoryResolver } from '@angular/core';
1010
import { ComponentPortal } from '@angular/cdk/portal';
1111
import { ComponentRef } from '@angular/core';
1212
import { ComponentType } from '@angular/cdk/overlay';
13+
import { Dialog } from '@angular/cdk/dialog';
1314
import { DialogRef } from '@angular/cdk/dialog';
1415
import { Direction } from '@angular/cdk/bidi';
1516
import { ElementRef } from '@angular/core';
@@ -94,6 +95,8 @@ export class MatDialog implements OnDestroy {
9495
get afterOpened(): Subject<MatDialogRef<any>>;
9596
closeAll(): void;
9697
// (undocumented)
98+
protected _dialog: Dialog;
99+
// (undocumented)
97100
protected dialogConfigClass: typeof MatDialogConfig;
98101
getDialogById(id: string): MatDialogRef<any> | undefined;
99102
// (undocumented)

0 commit comments

Comments
 (0)