Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 054d3c1

Browse files
committed
Update readme
1 parent 994dbde commit 054d3c1

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ npm install
7272
npm run serve
7373
```
7474

75-
# Props
75+
# ListScroller component interface
76+
77+
## Props
7678

7779
* `itemsData`: array of the data that is passed to items
7880
* `itemHeight`: approximate item height in pixels. it's used only at first rendering
7981
* `itemComponent`: vue js item component
8082
* `renderViewports`: height of the rendered part relative to viewport height. For example, if it's set to 5 and window inner height is 400, it will render 800 pixels before and after visible part of the list
8183

82-
# Events
84+
## Events
8385

8486
* `bottom`: emits when the last item is rendered. Used for infinite scroll
8587

@@ -90,6 +92,20 @@ npm run serve
9092
}
9193
```
9294

95+
# Item component interface
96+
97+
## Props
98+
99+
These properties are passed to the item component, all are optional.
100+
101+
* `index (Number)`: index of the item in the itemsData array
102+
* `data (Object)`: data of the item from itemsData array
103+
104+
## Methods
105+
106+
These methods can be called by the ListScroller, all are optional.
107+
108+
* `onResize()`: called after item resizing
93109

94110
# Similar projects
95111

0 commit comments

Comments
 (0)