Skip to content

feat: Add `topReached` event to infinite scroll to load previous items

Description

Add topReached event to infinite scroll to load previous items

  • Adds new event topReached when the top of the scrolling area is reached.
  • Checks if the items are added above, by checking if the size of the container has change, and corrects the position of the view port.
  • Scrolls to the bottom of the container when topReached is defined and bottomReached is not.

Review app

http://633-support-reverse-infinite-scrolling-infinite-load-up-in-gl-i.162.243.131.170.nip.io/?path=/story/base-infinite-scroll--default

Screenshots

Scroll up for more

2020-02-28_17.02.09

Scroll in either direction for more

2020-02-26_19.48.03

Related to #633 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports