-
Notifications
You must be signed in to change notification settings - Fork 294
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
Animation jerks when returning to the feed #478
Comments
Hi ! If you have a good knowledge of your items height, even if they are unequal (they might depend on a number of line which is statically known and could be known), I could probably give you the other fix I tried which consists in giving the virtual scroller a method to statically know all of items height. |
@Jugst3r can you share the fix for giving the virtual scroll a method to statically know all the item's height?. |
I would be also really be interested in the code to fix this. I have the same issue. |
Hi @Uchit-Patel, |
@Jugst3r Thank you that would be awesome! |
Darn it, I could not find this :'(. I remember implementing it, but digging back into this (awful) code would take time that I don't have right now ... Maybe you can try to see if the PR I did back then #479 mitigates the issue for your use case? I tried to explain a bit the (assumed) problem there |
Oh okay, No worries. Let me check that. |
Hiii @lincolnthree @Jugst3r . |
This helps! Thanks so much!!! I added an
Seems to be smoother! (We use pagination, so this happens all the time.) |
Glad to help!! I have done the same! |
Hey @rintoj , There should be an option to toggle this behavior for those who are not lazy loading the entire list. for those who are not appending or prepending items the solution I gave will solve the scrolling issue. what do you think? should i raise an PR for this? |
Hello.
Apologies in advance for my english.
In general, the problem is this... If you scroll the feed from the very beginning, then everything works perfectly, absolutely smooth scrolling. BUT if you scroll through a few pages, enter one of the posts, and then return to the feed and restore the scroll position, terrible glitches begin, the feed jumps up and down almost every scroll.
I restore the position using "scrollInto":
scrollTo(id: number) { this.virtualScroller.scrollInto( this.items.find((e) => e.id === id), undefined, -50, 0 ); }
Demo is unrealistic, the project is huge and completely decomposed. Therefore, I am attaching a video for clarity.
NEWS.mp4
Help me please.
The text was updated successfully, but these errors were encountered: