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

fix: now scrolls to top if the items array changes. #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevmodrome
Copy link

This fixes issue #30

@gitbreaker222
Copy link

looks good to me 👍
I thought of the same solution when my playlist-repl has several 1000 songs and i filter for names while scroll position is somewhere in the middle

@gitbreaker222
Copy link

edit:
if I understand this correctly, refresh with the new "scrollUp" would be called if the next list length is smaller or greater. But if the list gets longer, it would (re)create another issue as described in #15

=> if we add items (lazy loading / infinite scroll) we want to keep the current scroll position

So right now we have:
filter: removing items resets scroll to top (prevent empty viewport)
☑️ load more: adding items keeps scroll position

And this PR turns it around to:
☑️ filter: removing items resets scroll to top
load more: adding items keeps scroll position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants