Skip to content

Commit e091408

Browse files
committed
update doc
1 parent cbc7f1a commit e091408

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rc-virtual-list
22

3-
React Virtual List Component which worked with `rc-animation`.
3+
React Virtual List Component which worked with animation.
44

55
[![NPM version][npm-image]][npm-url] [![build status][circleci-image]][circleci-url] [![Test coverage][coveralls-image]][coveralls-url] [![node version][node-image]][node-url] [![npm download][download-image]][download-url]
66

@@ -14,3 +14,45 @@ React Virtual List Component which worked with `rc-animation`.
1414
[node-url]: http://nodejs.org/download/
1515
[download-image]: https://img.shields.io/npm/dm/rc-virtual-list.svg?style=flat-square
1616
[download-url]: https://npmjs.org/package/rc-virtual-list
17+
18+
## Development
19+
20+
```bash
21+
npm install
22+
npm start
23+
open http://localhost:9001/
24+
```
25+
26+
## Feature
27+
28+
- Support react.js
29+
- Support animation
30+
- Support IE11+
31+
32+
## Install
33+
34+
[![rc-virtual-list](https://nodei.co/npm/rc-virtual-list.png)](https://npmjs.org/package/rc-virtual-list)
35+
36+
## Usage
37+
38+
```js
39+
import List from 'rc-virtual-list';
40+
41+
<List data={[0, 1, 2]} height={200} itemHeight={30} itemKey="id">
42+
{index => <div>{index}</div>}
43+
</List>;
44+
```
45+
46+
# API
47+
48+
## List
49+
50+
| Prop | Description | Type | Default |
51+
| ---------- | ------------------------------------------------------- | -------------------- | ------- |
52+
| children | Render props of item | item => ReactElement | - |
53+
| component | Customize List dom element | string \| Component | div |
54+
| data | Data list | Array | - |
55+
| disabled | Disable scroll check. Usually used on animation control | boolean | false |
56+
| height | List height | number | - |
57+
| itemHeight | Item minium height | number | - |
58+
| itemKey | Match key with item | string | - |

0 commit comments

Comments
 (0)