Skip to content

fix(material/sidenav): use sidenav components in autosize example#32820

Open
yogeshwaran-c wants to merge 1 commit intoangular:mainfrom
yogeshwaran-c:fix/sidenav-autosize-example
Open

fix(material/sidenav): use sidenav components in autosize example#32820
yogeshwaran-c wants to merge 1 commit intoangular:mainfrom
yogeshwaran-c:fix/sidenav-autosize-example

Conversation

@yogeshwaran-c
Copy link

What kind of change does this PR introduce?

Bug fix (documentation example)

What is the current behavior?

The "Autosize sidenav" example (sidenav-autosize) incorrectly uses mat-drawer-container and mat-drawer components instead of mat-sidenav-container and mat-sidenav. This is misleading because the example appears in the sidenav documentation under the "Resizing an open sidenav" section.

Closes #30616

What is the new behavior?

The example now correctly uses mat-sidenav-container, mat-sidenav, and mat-sidenav-content — consistent with other sidenav examples in the documentation. The autosize attribute works identically since MatSidenavContainer extends MatDrawerContainer.

Additional context

  • The TypeScript file already imported MatSidenavModule, so only the template needed updating.
  • The template variable was renamed from #drawer to #sidenav for consistency.
  • The content wrapper was changed from a plain <div> to <mat-sidenav-content> to match other sidenav examples.

The autosize sidenav example incorrectly used mat-drawer and
mat-drawer-container instead of mat-sidenav and mat-sidenav-container.
Since this example appears in the sidenav documentation under
"Resizing an open sidenav", it should use sidenav components.

Closes angular#30616
@pullapprove pullapprove bot requested review from mmalerba and tjshiu February 23, 2026 18:41
@tjshiu tjshiu added the docs: preview When applied, a preview of the documentation site is deployed to Firebase label Feb 23, 2026
@mmalerba mmalerba removed their request for review February 24, 2026 19:13
@pullapprove pullapprove bot requested a review from ok7sai February 24, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: material/sidenav docs: preview When applied, a preview of the documentation site is deployed to Firebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs-bug(Sidenav): Autosize sidenav example uses drawer instead of sidenav

2 participants