ggordan / react-infinite-grid

A React component which renders a grid of elements.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make InfiniteGrid act like a InfiniteList

k-sheth opened this issue · comments

I wanted to make the component act like an infinite list. i.e, just show 1 item per row. I tried fiddling with the height and width props but failed. Appreciate if you could point me on which props to manipulate to achieve this effect.

Thanks

For now, I have managed to achieve this by overriding _getItemsPerRow to always return 1, but would appreciate if you can have away to send as props.

commented

@k-sheth How did this work out for you? I am curious about this.

@ggordan Do you imagine this being a first class feature in the library?

I would also advocate this for being a first class feature.

My use case is that I have a bunch of sections on a page that infinite scroll as a grid, but there is an odd section out displays items as a list with 1 item that takes up the entire row (each item varies in height as well).

As of now I cannot use this library for the odd section out, but it works like a charm for the others!

Sorry, it did not work out well. Having said that, our screens took a different turn and we dont need an infinite list anymore.

commented

@ggordan Do you imagine this being a first class feature in the library?