Skip to content

Commit bddeb48

Browse files
Update Show/Edit/Create/List props types in documentation
1 parent 0a387f2 commit bddeb48

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

docs/Create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ You can customize the `<Create>` component using the following props:
7171
| `redirect` | Optional | `string`/`function` | `'edit'` | Change the redirect location after successful creation |
7272
| `resource` | Optional | `string` | From URL | Override the name of the resource to create |
7373
| `sx` | Optional | `object` | - | Override the styles |
74-
| `title` | Optional | `ReactNode` | Translation | Override the page title |
74+
| `title` | Optional | `ReactNode` / `string` / `false` | Translation | Override the page title |
7575
| `transform` | Optional | `function` | - | Transform the form data before calling `dataProvider.create()` |
7676

7777
`*` You must provide either `children` or `render`.

docs/Edit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ You can customize the `<Edit>` component using the following props:
8484
| `redirect` | Optional | `'list'` &#124; `'show'` &#124; `false` &#124; `function` | `'list'` | Change the redirect location after successful update |
8585
| `resource` | Optional | `string` | - | Override the name of the resource to edit |
8686
| `sx` | Optional | `object` | - | Override the styles |
87-
| `title` | Optional | `string` &#124; `ReactNode` &#124; `false` | - | Override the page title |
87+
| `title` | Optional | `ReactNode` / `string` / `false` | - | Override the page title |
8888
| `redirectOnError` | Optional | `'list'` &#124; `false` &#124; `function` | `'list'` | The page to redirect to when an error occurs |
8989
| `transform` | Optional | `function` | - | Transform the form data before calling `dataProvider.update()` |
9090

docs/InfiniteList.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ The props are the same as [the `<List>` component](./List.md):
6161
| `children` | Required if no render | `ReactNode` | - | The component to use to render the list of records. |
6262
| `render` | Required if no children | `ReactNode` | - | A function that render the list of records, receives the list context as argument. |
6363
| `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. |
64+
| `aside` | Optional | `(listContext) => ReactNode` | - | The component to display on the side of the list. |
6565
| `authLoading` | Optional | `ReactNode` | - | The component to render while checking for authentication and permissions. |
6666
| `component` | Optional | `Component` | `Card` | The component to render as the root element. |
6767
| `debounce` | Optional | `number` | `500` | The debounce delay in milliseconds to apply when users change the sort or filter parameters. |
6868
| `disable Authentication` | Optional | `boolean` | `false` | Set to `true` to disable the authentication check. |
6969
| `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. |
70+
| `empty` | Optional | `ReactNode` | - | The component to display when the list is empty. |
7171
| `empty WhileLoading` | Optional | `boolean` | `false` | Set to `true` to return `null` while the list is loading. |
7272
| `error` | Optional | `ReactNode` | - | The component to render when failing to load the list of records. |
7373
| `exporter` | Optional | `function` | - | The function to call to export the list. |
@@ -76,13 +76,13 @@ The props are the same as [the `<List>` component](./List.md):
7676
| `filter DefaultValues` | Optional | `object` | - | The default filter values. |
7777
| `loading` | Optional | `ReactNode` | - | The component to render while loading the list of records. |
7878
| `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. |
79+
| `pagination` | Optional | `ReactNode` | `<Infinite Pagination>` | The pagination component to use. |
8080
| `perPage` | Optional | `number` | `10` | The number of records to fetch per page. |
8181
| `queryOptions` | Optional | `object` | - | The options to pass to the `useQuery` hook. |
8282
| `resource` | Optional | `string` | - | The resource name, e.g. `posts`. |
8383
| `sort` | Optional | `object` | - | The initial sort parameters. |
8484
| `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. |
85+
| `title` | Optional | `ReactNode` / `string` / `false` | - | The title to display in the App Bar. |
8686
| `sx` | Optional | `object` | - | The CSS styles to apply to the component. |
8787

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

docs/List.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ You can find more advanced examples of `<List>` usage in the [demos](./Demos.md)
7979
| `resource` | Optional | `string` | - | The resource name, e.g. `posts`. |
8080
| `sort` | Optional | `object` | - | The initial sort parameters. |
8181
| `storeKey` | Optional | `string` &#124; `false` | - | The key to use to store the current filter & sort. Pass `false` to disable store synchronization |
82-
| `title` | Optional | `ReactNode` | - | The title to display in the App Bar. |
82+
| `title` | Optional | `ReactNode` / `string` / `false` | - | The title to display in the App Bar. |
8383
| `sx` | Optional | `object` | - | The CSS styles to apply to the component. |
8484

8585
`*` You must provide either `children` or `render`.

docs/Show.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ That's enough to display the post show view above.
7878
| `redirectOnError` | Optional | `'list'` &#124; `false` &#124; `function` | `'list'` | The page to redirect to when an error occurs
7979
| `resource` | Optional | `string` | | The resource name, e.g. `posts`
8080
| `sx` | Optional | `object` | | Override or extend the styles applied to the component
81-
| `title` | Optional | `string` &#124; `ReactElement` &#124; `false` | | The title to display in the App Bar
81+
| `title` | Optional | `ReactNode` / `string` / `false` | | The title to display in the App Bar
8282

8383
`*` You must provide either `children` or `render`.
8484

0 commit comments

Comments
 (0)