Closed alemidev closed 3 months ago
Your intuition is right, there is a bit of setup required. You need to make sure that your containing element doesn't grow with more and more content. There has to be some overflow: scroll
and some height limit somewhere.
Closing this; feel free to reopen if this issue persists.
im trying to create an infinite scroll view but leptos-use component constantly triggers (video, see scrollbar), overloading both client and server with content
minimal sample code to reproduce:
i think this is related to
use_scroll()
: it seems to not properly detect element height and position, always returning0
to position andtrue
to arrived_state.use_window_scroll()
behaves as expected instead (and im doing my math manually with that currently).i saw issue #31 mentions doing
use_scroll("html")
but that seems to not work too.am i missing something? does infinite scroll require more setup to work as intended? the online demo works flawlessly, so i considered wrongdoing on my part, but even the simplest example appears to not work so im reporting this here!