react-fixed-scroll-element
A fixed-height scrolling element for React using RxJS.
Installation
npm install --save-dev react-fixed-scroll-element
, hopefully.
Usage
var FixedScrollElement = ; var ExampleTable = React;
-
elementConstructor
- constructor for the rows (e.g. 'table', 'ul') -
containerHeight
- height for the container -
rowHeight
- height of a row -
rowCount
- total count of rows -
rowGetter
- getter takes the item index, key index (for rendering in the outlet), top (for absolute positioning)
Notes
As you can see, the rows are absolutely positioned, and the container is relatively positioned.
Works by similar way that fixed-data-table does, by only displaying a few items that are visible to the user.
Original method by simple.gy: http://www.simple.gy/blog/infinite-bacon/
Comments
The source is only 94 lines, so copy paste away.