naver / egjs-infinitegrid

A module used to arrange card elements including content infinitely on a grid layout.
https://naver.github.io/egjs-infinitegrid/
MIT License
2.23k stars 95 forks source link

Infinite scroll working in Svelte but not React? #479

Closed pozdena closed 2 years ago

pozdena commented 2 years ago

Description

Items not loading on scroll in React, but working in Svelte.

Steps to check or reproduce

Infinite scroll is working in this Svelte example: https://svelte.dev/repl/8c271c4a5c6848eabffd5efe1cc6cfde?version=3.44.2

Essentially the same app does not work in React: https://codesandbox.io/s/react-repl-forked-foc10i?file=/src/index.js

Can you help me figure out why this isn't working in React? Am I overlooking something? Thank you.

daybrush commented 2 years ago

@pozdena

Since .container is a scroll container, you need to set height: 600px to .container

https://codesandbox.io/s/react-repl-forked-qhnkcg?file=/src/index.js

pozdena commented 2 years ago

@daybrush Thank you!!