Phx-viewport-bottom not triggered for a scrollable div

Hi,

I have a scrollable container for which I would like to use phx-viewport-top and phx-viewport-bottom.

The Hooks.InfiniteScroll sets the onScroll listener on window which is not fired for a content inside the element.

Is there any way to make it work?

Thank you

3 Likes

it only works on the window viewport today

1 Like

Hey Chris, I know this is super old, but are there any plans for scroll events for containers? Or should we just use JS hooks?

As of LV 0.20.4 we support it for any scrollable container. We walk up the DOM to find the first scrollable (overflow-y scroll) container and fallback to window viewport.

4 Likes

Oh awesome, thanks!