3.4.9 • Published 2 years ago

rc-virtual-list-scroll v3.4.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

rc-virtual-list

React Virtual List Component which worked with animation.

NPM version dumi build status Test coverage node version npm download

Online Preview

https://virtual-list-react-component.vercel.app/

Development

npm install
npm start
open http://localhost:9001/

Feature

  • Support react.js
  • Support animation
  • Support IE11+

Install

rc-virtual-list

Usage

import List from 'rc-virtual-list';

<List data={[0, 1, 2]} height={200} itemHeight={30} itemKey="id">
  {index => <div>{index}</div>}
</List>;

API

List

PropDescriptionTypeDefault
childrenRender props of item(item, index, props) => ReactElement-
componentCustomize List dom elementstring | Componentdiv
dataData listArray-
disabledDisable scroll check. Usually used on animation controlbooleanfalse
heightList heightnumber-
itemHeightItem minium heightnumber-
itemKeyMatch key with itemstring-

children provides additional props argument to support IE 11 scroll shaking. It will set style to visibility: hidden when measuring. You can ignore this if no requirement on IE.