react-infinite-any-height
react-infinite with automatic height calculation.
Try it - Live Example
Install
npm install react-infinite-any-height
(peer dependencies: react
)
Demo
Check out Live Example, or run locally
git clone git@github.com:Radivarig/react-infinite-any-height.gitnpm installnpm run dev
navigate to localhost:8080
Usage
// ...;;; { super; const list = 10000; thisstate = list ; } { return <InfiniteAnyHeight list=thisstatelist preloadAdditionalHeight=windowinnerHeight*2 useWindowAsScrollContainer /> ; } var elemDiv = documentdocumentbodyReactDOM
All props
are passed to react-infinite
as well.
When updating list
make sure to use .slice(0)
to change reference.
If useWindowAsScrollContainer
is ommited, both containerHeight
and
scrollContainer
(the node that has the active .scrollTop) props are required.
License
MIT