You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ If you are running the plugin in the `skeleton-naviagion` project, make sure to
89
89
#### infinite scroll
90
90
```html
91
91
<template>
92
-
<divvirtual-repeat.for="item of items"virtual-repeat-next="getMore">
92
+
<divvirtual-repeat.for="item of items"infinite-scroll-next="getMore">
93
93
${$index} ${item}
94
94
</div>
95
95
</template>
@@ -108,7 +108,7 @@ export class MyVirtualList {
108
108
Or to use an expression, use `.call` as shown below.
109
109
```html
110
110
<template>
111
-
<divvirtual-repeat.for="item of items"virtual-repeat-next.call="getMore($scrollContext)">
111
+
<divvirtual-repeat.for="item of items"infinite-scroll-next.call="getMore($scrollContext)">
112
112
${$index} ${item}
113
113
</div>
114
114
</template>
@@ -124,7 +124,7 @@ export class MyVirtualList {
124
124
}
125
125
```
126
126
127
-
The `virtual-repeat-next` attribute can accept a function, a promise, or a function that returns a promise.
127
+
The `infinite-scroll-next` attribute can accept a function, a promise, or a function that returns a promise.
128
128
The bound function will be called when the scroll container has reached a point where there are no more items to move into the DOM (i.e. when it reaches the end of a list, either from the top or the bottom).
129
129
There are three parameters that are passed to the function (`getMore(topIndex, isAtBottom, isAtTop)`) which helps determine the behavior or amount of items to get during scrolling.
130
130
1.`topIndex` - A integer value that represents the current item that exists at the top of the rendered items in the DOM.
0 commit comments