Skip to content

refactor(material/sidenav): undeprecate constructor signature #20589

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

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions src/material/sidenav/drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,6 @@ export class MatDrawer implements AfterContentInit, AfterContentChecked, OnDestr
private _platform: Platform,
private _ngZone: NgZone,
@Optional() @Inject(DOCUMENT) private _doc: any,
/**
* @deprecated `_container` parameter to be made required.
* @breaking-change 10.0.0
*/
@Optional() @Inject(MAT_DRAWER_CONTAINER) public _container?: MatDrawerContainer) {

this.openedChange.subscribe((opened: boolean) => {
Expand Down Expand Up @@ -626,7 +622,6 @@ export class MatDrawerContainer implements AfterContentInit, DoCheck, OnDestroy
this._allDrawers.changes
.pipe(startWith(this._allDrawers), takeUntil(this._destroyed))
.subscribe((drawer: QueryList<MatDrawer>) => {
// @breaking-change 10.0.0 Remove `_container` check once container parameter is required.
this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
this._drawers.notifyOnChanges();
});
Expand Down
3 changes: 1 addition & 2 deletions tools/public_api_guard/material/sidenav.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export declare class MatDrawer implements AfterContentInit, AfterContentChecked,
readonly openedStart: Observable<void>;
get position(): 'start' | 'end';
set position(value: 'start' | 'end');
constructor(_elementRef: ElementRef<HTMLElement>, _focusTrapFactory: FocusTrapFactory, _focusMonitor: FocusMonitor, _platform: Platform, _ngZone: NgZone, _doc: any,
_container?: MatDrawerContainer | undefined);
constructor(_elementRef: ElementRef<HTMLElement>, _focusTrapFactory: FocusTrapFactory, _focusMonitor: FocusMonitor, _platform: Platform, _ngZone: NgZone, _doc: any, _container?: MatDrawerContainer | undefined);
_animationDoneListener(event: AnimationEvent): void;
_animationStartListener(event: AnimationEvent): void;
_closeViaBackdropClick(): Promise<MatDrawerToggleResult>;
Expand Down