Skip to content

Commit 32d5a70

Browse files
committed
Document authLoading, loading, error properties of List, InfiniteList, ListBase and InfiniteListBase.
1 parent 9569108 commit 32d5a70

File tree

5 files changed

+153
-54
lines changed

5 files changed

+153
-54
lines changed

docs/InfiniteList.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,34 @@ That's enough to display a basic post list, that users can sort and filter, and
5656

5757
The props are the same as [the `<List>` component](./List.md):
5858

59-
| Prop | Required | Type | Default | Description |
60-
|----------------------------|----------|----------------|-------------------------|----------------------------------------------------------------------------------------------|
61-
| `children` | Required if no render | `ReactNode` | - | The component to use to render the list of records. |
62-
| `render` | Required if no children | `ReactNode` | - | A function that render the list of records, receives the list context as argument. |
63-
| `actions` | Optional | `ReactElement` | - | The actions to display in the toolbar. |
64-
| `aside` | Optional | `(listContext) => ReactElement` | - | The component to display on the side of the list. |
65-
| `component` | Optional | `Component` | `Card` | The component to render as the root element. |
66-
| `debounce` | Optional | `number` | `500` | The debounce delay in milliseconds to apply when users change the sort or filter parameters. |
67-
| `disable Authentication` | Optional | `boolean` | `false` | Set to `true` to disable the authentication check. |
68-
| `disable SyncWithLocation` | Optional | `boolean` | `false` | Set to `true` to disable the synchronization of the list parameters with the URL. |
69-
| `empty` | Optional | `ReactElement` | - | The component to display when the list is empty. |
70-
| `empty WhileLoading` | Optional | `boolean` | `false` | Set to `true` to return `null` while the list is loading. |
71-
| `exporter` | Optional | `function` | - | The function to call to export the list. |
72-
| `filters` | Optional | `ReactElement` | - | The filters to display in the toolbar. |
73-
| `filter` | Optional | `object` | - | The permanent filter values. |
74-
| `filter DefaultValues` | Optional | `object` | - | The default filter values. |
75-
| `offline` | Optional | `ReactNode` | `<Offline>` | The component to render when there is no connectivity and there is no data in the cache |
76-
| `pagination` | Optional | `ReactElement` | `<Infinite Pagination>` | The pagination component to use. |
77-
| `perPage` | Optional | `number` | `10` | The number of records to fetch per page. |
78-
| `queryOptions` | Optional | `object` | - | The options to pass to the `useQuery` hook. |
79-
| `resource` | Optional | `string` | - | The resource name, e.g. `posts`. |
80-
| `sort` | Optional | `object` | - | The initial sort parameters. |
81-
| `storeKey` | Optional | `string` | - | The key to use to store the current filter & sort. |
82-
| `title` | Optional | `string` | - | The title to display in the App Bar. |
83-
| `sx` | Optional | `object` | - | The CSS styles to apply to the component. |
59+
| Prop | Required | Type | Default | Description |
60+
|----------------------------|-------------------------|---------------------------------|-------------------------|----------------------------------------------------------------------------------------------|
61+
| `children` | Required if no render | `ReactNode` | - | The component to use to render the list of records. |
62+
| `render` | Required if no children | `ReactNode` | - | A function that render the list of records, receives the list context as argument. |
63+
| `actions` | Optional | `ReactElement` | - | The actions to display in the toolbar. |
64+
| `aside` | Optional | `(listContext) => ReactElement` | - | The component to display on the side of the list. |
65+
| `authLoading` | Optional | `ReactNode` | - | The component to render while checking for authentication and permissions. |
66+
| `component` | Optional | `Component` | `Card` | The component to render as the root element. |
67+
| `debounce` | Optional | `number` | `500` | The debounce delay in milliseconds to apply when users change the sort or filter parameters. |
68+
| `disable Authentication` | Optional | `boolean` | `false` | Set to `true` to disable the authentication check. |
69+
| `disable SyncWithLocation` | Optional | `boolean` | `false` | Set to `true` to disable the synchronization of the list parameters with the URL. |
70+
| `empty` | Optional | `ReactElement` | - | The component to display when the list is empty. |
71+
| `empty WhileLoading` | Optional | `boolean` | `false` | Set to `true` to return `null` while the list is loading. |
72+
| `error` | Optional | `ReactNode` | - | The component to render when failing to load the list of records. |
73+
| `exporter` | Optional | `function` | - | The function to call to export the list. |
74+
| `filters` | Optional | `ReactElement` | - | The filters to display in the toolbar. |
75+
| `filter` | Optional | `object` | - | The permanent filter values. |
76+
| `filter DefaultValues` | Optional | `object` | - | The default filter values. |
77+
| `loading` | Optional | `ReactNode` | - | The component to render while loading the list of records. |
78+
| `offline` | Optional | `ReactNode` | `<Offline>` | The component to render when there is no connectivity and there is no data in the cache |
79+
| `pagination` | Optional | `ReactElement` | `<Infinite Pagination>` | The pagination component to use. |
80+
| `perPage` | Optional | `number` | `10` | The number of records to fetch per page. |
81+
| `queryOptions` | Optional | `object` | - | The options to pass to the `useQuery` hook. |
82+
| `resource` | Optional | `string` | - | The resource name, e.g. `posts`. |
83+
| `sort` | Optional | `object` | - | The initial sort parameters. |
84+
| `storeKey` | Optional | `string` | - | The key to use to store the current filter & sort. |
85+
| `title` | Optional | `string` | - | The title to display in the App Bar. |
86+
| `sx` | Optional | `object` | - | The CSS styles to apply to the component. |
8487

8588
Check the [`<List>` component](./List.md) for details about each prop.
8689

0 commit comments

Comments
 (0)