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
A clear and concise description of what the bug is.
9
+
10
+
**To Reproduce**
11
+
Please clone your layout and use of react-infinite-scroller by forking [this Code Sandbox](https://codesandbox.io/s/my6vo3yo78) and linking it here. Doing so will massively expedite getting the bug fixed! 👊
12
+
13
+
**Expected behavior**
14
+
A clear and concise description of what you expected to happen.
15
+
16
+
**Screenshots**
17
+
If applicable, add screenshots to help explain your problem.
18
+
19
+
**Device (please complete the following information):**
@@ -56,11 +60,12 @@ import InfiniteScroll from 'react-infinite-scroller';
56
60
57
61
| Name | Type | Default | Description|
58
62
|:---- |:---- |:---- |:----|
59
-
|`element`|`String`|`'div'`| Name of the element that the component should render as.|
63
+
|`element`|`Component`|`'div'`| Name of the element that the component should render as.|
60
64
|`hasMore`|`Boolean`|`false`| Whether there are more items to be loaded. Event listeners are removed if `false`.|
61
65
|`initialLoad`|`Boolean`|`true`| Whether the component should load the first set of items.|
62
66
|`isReverse`|`Boolean`|`false`| Whether new items should be loaded when user scrolls to the top of the scrollable area.|
63
-
|`loadMore`|`Function`|| A callback when more items are requested by the user.|
67
+
|`loadMore`|`Function`|| A callback when more items are requested by the user. Receives a single parameter specifying the page to load e.g. `function handleLoadMore(page) { /* load more items here */ }` }|
68
+
|`loader`|`Component`|| A React component to render while more items are loading. The parent component must have a unique key prop. |
64
69
|`pageStart`|`Number`|`0`| The number of the first page to load, With the default of `0`, the first page is `1`.|
65
70
|`threshold`|`Number`|`250`| The distance in pixels before the end of the items that will trigger a call to `loadMore`.|
66
71
|`useCapture`|`Boolean`|`false`| Proxy to the `useCapture` option of the added event listeners.|
0 commit comments