twobin / react-lazyload

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

Does the library support horizontal lazy load out of the box ? #239

Closed Sara2009 closed 5 years ago

Sara2009 commented 5 years ago

In the readme.md the props offset says it supports horizontal lazyload and we can set it as an array. But in the source code, there is no method to judge the horizontal scroll visible? Is there is something wrong or am I missing something?

chrisdopuch commented 5 years ago

I'm building a horizontally scrollable image gallery, and I'm finding that the lazy loading does not work (all images get loaded at once, even ones that are fully off the screen). I will try using the preventLoading prop, but it would be great if this "just worked" out of the box.

chrisdopuch commented 5 years ago

Looks like this issue is still open, so that's officially a "no" on horizontal scrolling: https://github.com/twobin/react-lazyload/issues/56

This can probably be closed as duplicate @Sara2009 , I hope that it gets implemented soon! 🤞

ameerthehacker commented 5 years ago

@chrisdopuch @Sara2009 #231 PR added it and it is already published

chrisdopuch commented 5 years ago

Amazing! Thanks @ameerthehacker , I guess the other ticket should get closed then. So happy to hear this! ❤️

ameerthehacker commented 5 years ago

Thanks, @chrisdopuch I have closed the ticket #56

ttmthanh commented 2 years ago

I set offset but seem it does not work with horizontal list :'(