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
|`offline`| Optional |`ReactNode`|`<Offline>`| The component to render when there is no connectivity and there is no data in the cache |
75
76
|`pagination`| Optional |`ReactElement`|`<Infinite Pagination>`| The pagination component to use. |
76
77
|`perPage`| Optional |`number`|`10`| The number of records to fetch per page. |
77
78
|`queryOptions`| Optional |`object`| - | The options to pass to the `useQuery` hook. |
@@ -85,6 +86,49 @@ Check the [`<List>` component](./List.md) for details about each prop.
85
86
86
87
Additional props are passed down to the root component (a MUI `<Card>` by default).
87
88
89
+
## `offline`
90
+
91
+
By default, `<List>` renders the `<Offline>` component when there is no connectivity and there are no records in the cache yet for the current parameters (page, sort, etc.). You can provide your own component via the `offline` prop:
**Tip**: If the record is in the Tanstack Query cache but you want to warn the user that they may see an outdated version, you can use the `<IsOffline>` component:
You can replace the default "load on scroll" pagination (triggered by a component named `<InfinitePagination>`) by a custom pagination component. To get the pagination state and callbacks, you'll need to read the `InfinitePaginationContext`.
0 commit comments