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

afterScroll not firing #24

Open
FluffyDiscord opened this issue Nov 14, 2022 · 3 comments
Open

afterScroll not firing #24

FluffyDiscord opened this issue Nov 14, 2022 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@FluffyDiscord
Copy link

Hi, the afterScroll is not firing for me, any tips ?

<VirtualList
            width="100%"
            height={400}
            itemCount={$messages.length}
            itemSize={92}
            {scrollOffset}
            {scrollToBehaviour}
            on:afterScroll={() => console.log("well, hello there")}
    >
        <svelte:fragment slot="item" let:index let:style>
            {@const message = $messages[index]}
            <div class="flex gap-x-6 px-8 py-6 relative" {style}>
               // thingy
            </div>
        </svelte:fragment>
</VirtualList>
@jonasgeiler
Copy link
Owner

Hey, I saw the commit on your fork but it doesn't really make sense to me to dispatch the event when the offset didn't change, since this means the user didn't actually scroll - right?
Also keeping the event.target !== wrapper in the condition might not be a good idea since we only want to handle scroll events on the actual wrapper.

@FluffyDiscord
Copy link
Author

In my case, the event wasn't firing at all. I could scroll however I want and it wouldn't trigger.

@jonasgeiler
Copy link
Owner

Just noticed that it isn't actually your fork anyway-
But yeah that's weird... Maybe I'll check it out sometime (very busy at the moment)

@jonasgeiler jonasgeiler added the bug Something isn't working label Feb 12, 2024
@jonasgeiler jonasgeiler added this to the 3.0.0 milestone Feb 12, 2024
@jonasgeiler jonasgeiler self-assigned this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants