Skip to content

Commit 993767f

Browse files
authored
refactor(material/sidenav): undeprecate constructor signature (#20589)
Removes the deprecation labels from a constructor parameter since it's tricky to sync into g3 and is easy to maintain on our end.
1 parent 54c66bc commit 993767f

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/material/sidenav/drawer.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,6 @@ export class MatDrawer implements AfterContentInit, AfterContentChecked, OnDestr
263263
private _platform: Platform,
264264
private _ngZone: NgZone,
265265
@Optional() @Inject(DOCUMENT) private _doc: any,
266-
/**
267-
* @deprecated `_container` parameter to be made required.
268-
* @breaking-change 10.0.0
269-
*/
270266
@Optional() @Inject(MAT_DRAWER_CONTAINER) public _container?: MatDrawerContainer) {
271267

272268
this.openedChange.subscribe((opened: boolean) => {
@@ -626,7 +622,6 @@ export class MatDrawerContainer implements AfterContentInit, DoCheck, OnDestroy
626622
this._allDrawers.changes
627623
.pipe(startWith(this._allDrawers), takeUntil(this._destroyed))
628624
.subscribe((drawer: QueryList<MatDrawer>) => {
629-
// @breaking-change 10.0.0 Remove `_container` check once container parameter is required.
630625
this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
631626
this._drawers.notifyOnChanges();
632627
});

tools/public_api_guard/material/sidenav.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export declare class MatDrawer implements AfterContentInit, AfterContentChecked,
2424
readonly openedStart: Observable<void>;
2525
get position(): 'start' | 'end';
2626
set position(value: 'start' | 'end');
27-
constructor(_elementRef: ElementRef<HTMLElement>, _focusTrapFactory: FocusTrapFactory, _focusMonitor: FocusMonitor, _platform: Platform, _ngZone: NgZone, _doc: any,
28-
_container?: MatDrawerContainer | undefined);
27+
constructor(_elementRef: ElementRef<HTMLElement>, _focusTrapFactory: FocusTrapFactory, _focusMonitor: FocusMonitor, _platform: Platform, _ngZone: NgZone, _doc: any, _container?: MatDrawerContainer | undefined);
2928
_animationDoneListener(event: AnimationEvent): void;
3029
_animationStartListener(event: AnimationEvent): void;
3130
_closeViaBackdropClick(): Promise<MatDrawerToggleResult>;

0 commit comments

Comments
 (0)