-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Manually set offset by setRenderedContentOffset should not go back to 0 on scroll
What is the current behavior?
Scrolling resets offset which is perceived as a jump
What are the steps to reproduce?
https://stackblitz.com/edit/angular-egcu9t
just click on "set offset to 200", see applied offset and then try to scroll
What is the use-case or motivation for changing an existing behavior?
I'm using this feature to create date picker similar to one in kendo(https://www.telerik.com/kendo-angular-ui/components/dateinputs/calendar/)
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
material 7.3.x
Is there anything else we should know?
Here's the responsible code:
https://github.com/angular/material2/blob/master/src/cdk/scrolling/fixed-size-virtual-scroll.ts#L81
https://github.com/angular/material2/blob/master/src/cdk/scrolling/fixed-size-virtual-scroll.ts#L149
As I got from the debugger, newRange.start is always 0, and it's seen from line 81 the function executes on scroll