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: intersection observer after migration to Svelte v5 #1092

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

peterpeterparker
Copy link
Contributor

Motivation

After migration to Svelte v5, the InfiniteScroll was actually broken. The root cause of the issue is the following breaking change:

beforeUpdate/afterUpdate no longer run when the component contains a and its content is updated.

https://svelte.dev/docs/svelte/v5-migration-guide#Other-breaking-changes-beforeUpdate-afterUpdate-changes

As a result, the "next" wallet transactions were not loaded in the UI.

It took me a bit of time to figure out, but the solution was to move the observer after the container instead of keeping it inside.

@peterpeterparker peterpeterparker merged commit 3ea2287 into main Jan 16, 2025
5 checks passed
@peterpeterparker peterpeterparker deleted the fix/intersection.-observer branch January 16, 2025 10:51
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.

1 participant