components icon indicating copy to clipboard operation
components copied to clipboard

Sidenav: Support for headers that are not fixed and onscroll events

Open bsteffl opened this issue 8 years ago • 6 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Maybe there would be an onscroll event that would subtract the top offset value as you scroll, and maybe an additional property that you would need to determine if you did or did not have a fixed header.

What is the current behavior?

If you set the sidenav to fixed [fixedInViewport]="true" and you offset the top value based on your header height [fixedTopGap]="64" and then you scroll down the fixed header doesn't re-position as you scroll when the header is offscreen.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-cm3u2d
header-gap

What is the use-case or motivation for changing an existing behavior?

To support a wider range of layout options for applications

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular Material 5.0.0-rc3

Is there anything else we should know?

It seems like sidenav was designed to be used with a fixed header due to the overflow properties and examples provided. If this is true then maybe I'm using it in the wrong context.

bsteffl avatar Jan 09 '18 21:01 bsteffl

currently you can accomplish this with a dynamic binding for fixedTopGap like this: https://stackblitz.com/edit/angular-cm3u2d-cij2dh?file=app/sidenav-fixed-example.ts

mmalerba avatar Jan 10 '18 00:01 mmalerba

Something exactly like this dynamic binding is done by the angular.io site when displaying an additional information bar on top. Then when you close it it animates back.

Unfortunately I'm not exactly sure how to trigger this additional bar, but I have seen it done.

simeyla avatar Mar 02 '19 01:03 simeyla

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] avatar Feb 01 '22 18:02 angular-robot[bot]

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Feb 21 '22 15:02 angular-robot[bot]

We are closing this issue, because we've determined, using a semi-automated process, that it is no longer relevant, has low engagement, or it does not have enough information to proceed. Feel free to comment if you think the issue should be reopened, or open a new issue with the latest version of our code instead.

crisbeto avatar May 29 '26 12:05 crisbeto

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.