Skip to content

Commit

Permalink
Move docs to virtualizedlist
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed May 17, 2023
1 parent a81024b commit 8e5de6e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 92 deletions.
40 changes: 0 additions & 40 deletions docs/flatlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,26 +600,6 @@ Multiple columns can only be rendered with `horizontal={false}` and will zig-zag

---

### `onEndReached`

Called once when the scroll position gets within within `onEndReachedThreshold` from the logical end of the list.

| Type |
| ----------------------------------------- |
| (info: {distanceFromEnd: number}) => void |

---

### `onEndReachedThreshold`

How far from the end (in units of visible length of the list) the trailing edge of the list must be from the end of the content to trigger the `onEndReached` callback. Thus, a value of 0.5 will trigger `onEndReached` when the end of the content is within half the visible length of the list.

| Type | Default |
| ------ | ------- |
| number | `2` |

---

### `onRefresh`

```tsx
Expand All @@ -634,26 +614,6 @@ If provided, a standard RefreshControl will be added for "Pull to Refresh" funct

---

### `onStartReached`

Called once when the scroll position gets within within `onStartReachedThreshold` from the logical start of the list.

| Type |
| ------------------------------------------- |
| (info: {distanceFromStart: number}) => void |

---

### `onStartReachedThreshold`

How far from the start (in units of visible length of the list) the leading edge of the list must be from the start of the content to trigger the `onStartReached` callback. Thus, a value of 0.5 will trigger `onStartReached` when the start of the content is within half the visible length of the list.

| Type | Default |
| ------ | ------- |
| number | `2` |

---

### `onViewableItemsChanged`

Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
Expand Down
40 changes: 0 additions & 40 deletions docs/sectionlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,26 +221,6 @@ Rendered at the very beginning of the list. Can be a React Component (e.g. `Some

---

### `onEndReached`

Called once when the scroll position gets within within `onEndReachedThreshold` from the logical end of the list.

| Type |
| ----------------------------------------- |
| (info: {distanceFromEnd: number}) => void |

---

### `onEndReachedThreshold`

How far from the end (in units of visible length of the list) the trailing edge of the list must be from the end of the content to trigger the `onEndReached` callback. Thus, a value of 0.5 will trigger `onEndReached` when the end of the content is within half the visible length of the list.

| Type | Default |
| ------ | ------- |
| number | `2` |

---

### `onRefresh`

If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the `refreshing` prop correctly. To offset the RefreshControl from the top (e.g. by 100 pts), use `progressViewOffset={100}`.
Expand All @@ -251,26 +231,6 @@ If provided, a standard RefreshControl will be added for "Pull to Refresh" funct

---

### `onStartReached`

Called once when the scroll position gets within within `onStartReachedThreshold` from the logical start of the list.

| Type |
| ------------------------------------------- |
| (info: {distanceFromStart: number}) => void |

---

### `onStartReachedThreshold`

How far from the start (in units of visible length of the list) the leading edge of the list must be from the start of the content to trigger the `onStartReached` callback. Thus, a value of 0.5 will trigger `onStartReached` when the start of the content is within half the visible length of the list.

| Type | Default |
| ------ | ------- |
| number | `2` |

---

### `onViewableItemsChanged`

Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
Expand Down
40 changes: 28 additions & 12 deletions docs/virtualizedlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,25 +421,21 @@ The maximum number of items to render in each incremental render batch. The more
### `onEndReached`
```tsx
(info: {distanceFromEnd: number}) => void;
```
Called once when the scroll position gets within `onEndReachedThreshold` of the rendered content.
Called once when the scroll position gets within within `onEndReachedThreshold` from the logical end of the list.
| Type |
| -------- |
| function |
| Type |
| ----------------------------------------- |
| (info: {distanceFromEnd: number}) => void |
---
### `onEndReachedThreshold`
How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the `onEndReached` callback. Thus a value of 0.5 will trigger `onEndReached` when the end of the content is within half the visible length of the list.
How far from the end (in units of visible length of the list) the trailing edge of the list must be from the end of the content to trigger the `onEndReached` callback. Thus, a value of 0.5 will trigger `onEndReached` when the end of the content is within half the visible length of the list.
| Type |
| ------ |
| number |
| Type | Default |
| ------ | ------- |
| number | `2` |
---
Expand Down Expand Up @@ -475,6 +471,26 @@ Used to handle failures when scrolling to an index that has not been measured ye
---
### `onStartReached`
Called once when the scroll position gets within within `onStartReachedThreshold` from the logical start of the list.
| Type |
| ------------------------------------------- |
| (info: {distanceFromStart: number}) => void |
---
### `onStartReachedThreshold`
How far from the start (in units of visible length of the list) the leading edge of the list must be from the start of the content to trigger the `onStartReached` callback. Thus, a value of 0.5 will trigger `onStartReached` when the start of the content is within half the visible length of the list.
| Type | Default |
| ------ | ------- |
| number | `2` |
---
### `onViewableItemsChanged`
Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
Expand Down

0 comments on commit 8e5de6e

Please sign in to comment.