twobin / react-lazyload

Lazy load your component, image or anything matters the performance.
MIT License
5.85k stars 487 forks source link

fix: scrollContainer should bypass overflow option #407

Open chartrandf opened 1 year ago

chartrandf commented 1 year ago

I had a hard time figuring out why my lazy components were not visible/triggered on scroll when scrollContainer & overflow are defined. I found that overflow make scrollContainer logic not used at all.

I suggest that if scrollContainer is defined, it bypasses overflow option. Because scrollContainer is more precise in finding the scroll element/parent.