clauderic / react-tiny-virtual-list

A tiny but mighty 3kb list virtualization library, with zero dependencies 💪 Supports variable heights/widths, sticky items, scrolling to index, and more!
https://clauderic.github.io/react-tiny-virtual-list/
MIT License
2.47k stars 164 forks source link

Total list height (item-height*num-items) breaks at 37,282,700 pixels #103

Open daSaf opened 3 years ago

daSaf commented 3 years ago

When I create a list with 1M items, each 50px high, I cannot scroll all the way down (last item is #745,653) . Looks like chrome maxes out on div height - CSS shows list's container div height is 37,282,700px, and seems it cannot grow larger.

image

See also 37,282,700px mentioned on stack-overflow.

<VirtualList
          width='100%'
          height={ 50 }
          itemCount={ 1000000 }
          itemSize={ 50 }
          estimatedItemSize={ 50 }
          overscanCount={ 1 }
          scrollToAlignment={ ALIGNMENT.START }
          scrollOffset={ 0 }
          renderItem={ ({ index, style }) => {
            return (
              <div key={ index } style={ style }
                   className={ classes.rowClass }>
                <RowItem/>
                { index }
              </div> );
          } }
        />