Skip to content

feat(infinite scroll): Add Infinite Scroll component

What is this for?

This is a component that will allow infinite scrolling.

Screen_Shot_2019-10-07_at_3.00.39_PM

It checks for the scrollHeight of the element contained in it and uses it to check when the user hits the bottom of the list. Once that happens it will emit bottomReached to its parent container.

It accepts two props: totalItems, which are the total number of results fetchedItems which are the number of items fetched in one request
scrollOffset which is used to calculate when the user has scrolled to the bottom. For example - if you'd like a max-height on a list from where the scrolling should start.

Caveats

This component does not handle the handling of the emitted message or the fetching. A complete implementation example is provided in the docs.

Part 1 of 2 for gitlab#30518 (closed)

Part 1: #390 (closed)

Edited by Laura Montemayor

Merge request reports