react-easy-infinite-scroll-hook
Advanced tools
Comparing version 1.3.4 to 1.3.5
{ | ||
"name": "react-easy-infinite-scroll-hook", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "This hook allows you to create simple, lightweight components with infinite scrolling in all directions, supporting both windowed and scrollable elements.", |
@@ -27,3 +27,3 @@ # react-easy-infinite-scroll-hook | ||
- 🌳 **Tree-shakeable** - Only include the parts you use | ||
- 💥 **Lightweight** - Around `~1.9kB` | ||
- 💥 **Lightweight** - Around `~2kB` | ||
- 💨 **No dependencies** | ||
@@ -134,10 +134,10 @@ | ||
| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ------------- | | ||
| next | Yes | A callback when more items are requested by the user. Receives a single parameter specifying the direction to load e.g. `(direction): Promise<void>` | Function | | | ||
| next | Yes | A callback when more items are requested by the user. Receives a single parameter specifying the direction to load e.g. `(direction) => Promise<void>` | Function | | | ||
| hasMore | Yes | Whether there are more items to be loaded. Expect object with directions to load `{ up: false, down: false, left: false, right: false }` | object | | | ||
| rowCount | Condition | Number of items in a `vertical` list (scroll axis `Y`). Required if you are using `vertical` scroll. | number | | | ||
| columnCount | Condition | Number of items in a `horizontal` list (scroll axis `X`). Required if you are using `horizontal` scroll. | number | | | ||
| onScroll | | The callback is called when the container is scrolled: `({ clientHeight: number, scrollHeight: number, scrollTop: number, clientWidth: number, scrollWidth: number, scrollLeft: number }): void` | Function | | | ||
| onScroll | | The callback is called when the container is scrolled: `({ clientHeight: number, scrollHeight: number, scrollTop: number, clientWidth: number, scrollWidth: number, scrollLeft: number }) => void` | Function | | | ||
| initialScroll | | The initial scroll position of the element, which is applied after the ref has been initialized | object | | | ||
| reverse | | The direction of the scroll axis is used to create scrolling in the opposite direction, for example when using the CSS style `flex-direction: 'row-reverse'` | object | | | ||
| scrollThreshold | | The threshold at which the next function is called. It can be specified in pixels from the scrollbar value, for example `'200px'` and as a percentage of the element value `0.6 = 60%` | number or string | 1 | | ||
| scrollThreshold | | The threshold at which the next function is called. It can be specified in pixels from the scrollbar value, for example `'200px'` and as a percentage of the container size `from 0.1 to 1` (`1` is `100%`) | number or string | 1 | | ||
@@ -144,0 +144,0 @@ ## Friends |
77187