bvaughn / react-virtualized

React components for efficiently rendering large lists and tabular data
http://bvaughn.github.io/react-virtualized/
MIT License
26.41k stars 3.06k forks source link

InfiniteLoader docs have broken code #1055

Closed nickretallack closed 1 month ago

nickretallack commented 6 years ago

The code sample here has problems.

columnCount is undefined, and the definition of _infiniteLoaderChildFunction is missing an = resulting in a syntax error.

Also, I'd love it if this example explained what props you should pass into this component, and what it does. Should my definition of isRowLoaded work in the domain of visual rows of the grid, or should it correspond to individual cells instead? Can this scroll in two dimensions or not?

Btw, I'm currently attempting to render a grid with consistently sized cells that scrolls in one dimension, but I'm not implementing it like this. Instead, I'm just doing a regular List InfiniteLoader and rendering multiple items into each row. react-virtualized doesn't need to know how many items I'm rendering in a row; I'm doing the math to adapt it myself. I just have the renderRow function change how many items it puts in a row depending on your window size. Of course this isn't going to retain where you were in the scrolling very well, and a custom solution may be necessary. It would be nice if your library supported an InfiniteLoader that worked on something like a thumbnail gallery. Should I look into contributing such a thing?

kamalkne commented 6 years ago

Anyone working on this issue? If not, I am interested.

wuweiweiwu commented 6 years ago

Feel free :)