Skip to content
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

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

Open
bsteffl opened this issue Jan 9, 2018 · 4 comments
Open

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

bsteffl opened this issue Jan 9, 2018 · 4 comments
Labels
area: material/sidenav feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@bsteffl
Copy link

bsteffl commented Jan 9, 2018

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.

@mmalerba mmalerba added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Jan 10, 2018
@mmalerba
Copy link
Contributor

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 mmalerba added the P4 A relatively minor issue that is not relevant to core functions label Jan 10, 2018
@simeyla
Copy link

simeyla commented Mar 2, 2019

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.

@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 1, 2022

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
Copy link
Contributor

angular-robot bot commented Feb 21, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/sidenav feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
4 participants