Skip to content

Commit 1b239e3

Browse files
committed
Update the documentation for version 5.10.2
1 parent dd7c8b4 commit 1b239e3

File tree

12 files changed

+114
-32
lines changed

12 files changed

+114
-32
lines changed

AuthProviderList.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ title: "Supported Auth Provider Backends"
88
It's very common that your auth logic is so specific that you'll need to write your own `authProvider`. However, the community has built a few open-source Auth Providers that may fit your need:
99

1010
<div class="providers-list" markdown="1">
11+
- ![Apisix logo](./img/backend-logos/apisix.svg "Apisix logo")**[Apache Apisix OIDC](https://apisix.apache.org/)**: [@arte/ra-apisix-oidc](https://www.npmjs.com/package/@arte/ra-apisix-oidc)
1112
- ![Appwrite Logo](./img/backend-logos/appwrite.svg "Appwrite Logo")**[Appwrite](https://appwrite.io/)**: [marmelab/ra-appwrite](https://github.com/marmelab/ra-appwrite)
1213
- ![auth0 Logo](./img/backend-logos/auth0.svg "auth0 Logo")**[Auth0 by Okta](https://auth0.com/)**: [marmelab/ra-auth-auth0](https://github.com/marmelab/ra-auth-auth0/blob/main/packages/ra-auth-auth0/Readme.md)
1314
- ![amplify Logo](./img/backend-logos/amplify.svg "amplify Logo")**[AWS Amplify](https://docs.amplify.aws)**: [MrHertal/react-admin-amplify](https://github.com/MrHertal/react-admin-amplify)

DataTable.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,3 +1871,23 @@ npx jscodeshift ./path/to/src/ \
18711871
--parser=tsx \
18721872
--transform=./node_modules/ra-core/codemods/replace-Datagrid-DataTable.ts
18731873
```
1874+
1875+
Here is what the codemod will transform for you:
1876+
1877+
- Replace `<Datagrid>` with `<DataTable>`.
1878+
- Replace `rowStyle` with `rowSx`.
1879+
- Remove the `optimized` prop (which isn't necessary anymore)
1880+
- Rename the keys in `sx` prop from `"& .RaDatagrid-xxxx"` to `"& .RaDataTable-xxxx"`.
1881+
- Replace simple `<TextField>` with `<DataTable.Col>`.
1882+
- Replace simple `<NumberField>` with `<DataTable.NumberCol>`.
1883+
- Wrap all other fields in `<DataTable.Col>`, keeping `source` and `label` properties in `<DataTable.Col>`.
1884+
- Replace `Datagrid` imports by `DataTable`, and remove unused `TextField` and `NumberField` imports if they are now all replaced.
1885+
1886+
However, the codemod will **not**:
1887+
1888+
- Replace `<DatagridConfigurable>` with `<DataTable>` (column selection is now natively supported by `<DataTable>`).
1889+
- Remove the `sortBy` and `sortable` props on fields (sorting is now managed by `<DataTable.Col source>`)
1890+
- Move the `sortByOrder` prop from the field to `<DataTable.Col>`
1891+
- Replace a `<FunctionField>` child with `<DataTable.Col render>`
1892+
- Replace `<Datagrid>` from `@react-admin/ra-rbac` (and all its children). Refer to [Access Control section](#access-control) to use `<DataTable>` with `<CanAccess>`.
1893+
- Move the column styles from `<Datagrid sx>` to the individual `<DataTable.Col sx>`

Edit.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ const PostEdit = () => (
413413

414414
{% endraw %}
415415

416+
**Warning**: If you set `mutationOptions` meta without [redirecting](#redirect), make sure that [`queryOptions`](#queryoptions) meta is the same, or you will have data update issues.
417+
416418
You can also use `mutationOptions` to override success or error side effects, by setting the `mutationOptions` prop. Refer to the [useMutation documentation](https://tanstack.com/query/v5/docs/react/reference/useMutation) in the react-query website for a list of the possible options.
417419

418420
Let's see an example with the success side effect. By default, when the save action succeeds, react-admin shows a notification, and redirects to the list page. You can override this behavior and pass custom success side effects by providing a `mutationOptions` prop with an `onSuccess` key:
@@ -561,6 +563,8 @@ export const PostShow = () => (
561563

562564
{% endraw %}
563565

566+
**Warning**: If you set `queryOptions` meta without [redirecting](#redirect), make sure that [`mutationOptions`](#mutationoptions) meta is the same, or you will have data update issues.
567+
564568
You can also use `queryOptions` to force a refetch on reconnect:
565569

566570
{% raw %}
@@ -596,7 +600,9 @@ const PostEdit = () => (
596600
);
597601
```
598602

599-
Note that the `redirect` prop is ignored if you set [the `mutationOptions` prop](#mutationoptions). See that prop for how to set a different redirection path in that case.
603+
Note that the `redirect` prop is ignored if you set an `onSuccess` callback of [the `mutationOptions` prop](#mutationoptions). See that prop for how to set a different redirection path in that case.
604+
605+
**Warning**: If you set [`queryOptions`](#queryoptions) meta without redirecting, make sure that [`mutationOptions`](#mutationoptions) meta is the same, or you will have data update issues.
600606

601607
## `render`
602608

Scheduler.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,19 @@ It uses all the available horizontal and vertical space in the layout's content
6161

6262
In addition to the props accepted by [Bryntum Scheduler](https://www.bryntum.com/products/scheduler/docs/guide/Scheduler/quick-start/react/), `<Scheduler>` accepts the following props:
6363

64-
| Prop | Required | Type | Default | Description |
65-
| ------------------- | -------- | --------- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
66-
| `actions` | Optional | ReactNode | | A component displayed on top of the scheduler, usually to display a toolbar with action buttons |
67-
| `converters` | Optional | object | | An object containing converters from dataProvider records to Bryntum models and vice-versa |
68-
| `CreateDialogProps` | Optional | object | | Props to pass to the `<CreateDialog>` used to create new events |
69-
| `EditDialogProps` | Optional | object | | Props to pass to the `<EditDialog>` used to edit existing events |
70-
| `eventCreate` | Optional | ReactNode | | The form used to create new events |
71-
| `eventEdit` | Optional | ReactNode | | The form used to edit existing events |
72-
| `eventName` | Optional | string | | The name of the resource for _Events_ |
73-
| `mutationOptions` | Optional | object | | The mutation options sent when updating _Events_ via drag/drop or resize and _Resources_ via the inline editor |
74-
| `resourcesName` | Optional | string | 'resources' | The name of the resource for _Resources_ |
75-
| `queryOptions` | Optional | object | | The query options sent when fetching _Events_ and _Resources_ |
76-
| `sx` | Optional | object | | The sx prop passed down to the wrapping `<div>` element |
77-
| `title` | Optional | object | | The title to display in the `<AppBar>` |
64+
| Prop | Required | Type | Default | Description |
65+
|---------------------| -------- | --------- |------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
66+
| `actions` | Optional | ReactNode | | A component displayed on top of the scheduler, usually to display a toolbar with action buttons |
67+
| `converters` | Optional | object | | An object containing converters from dataProvider records to Bryntum models and vice-versa |
68+
| `CreateDialogProps` | Optional | object | | Props to pass to the `<CreateDialog>` used to create new events |
69+
| `EditDialogProps` | Optional | object | | Props to pass to the `<EditDialog>` used to edit existing events |
70+
| `eventCreate` | Optional | ReactNode | | The form used to create new events |
71+
| `eventEdit` | Optional | ReactNode | | The form used to edit existing events |
72+
| `mutationOptions` | Optional | object | | The mutation options sent when updating _Events_ via drag/drop or resize and _Resources_ via the inline editor |
73+
| `resources` | Optional | object | `{ resources: "resources", events: "events" }` | The resources names to use for _Events_ and _Resources_ |
74+
| `queryOptions` | Optional | object | | The query options sent when fetching _Events_ and _Resources_ |
75+
| `sx` | Optional | object | | The sx prop passed down to the wrapping `<div>` element |
76+
| `title` | Optional | object | | The title to display in the `<AppBar>` |
7877

7978
## `actions`
8079

_data/versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- latest (5.10.1)
1+
- latest (5.10.2)
22
- "5.9"
33
- "5.8"
44
- "5.7"

doc/5.10/AuthProviderList.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ title: "Supported Auth Provider Backends"
88
It's very common that your auth logic is so specific that you'll need to write your own `authProvider`. However, the community has built a few open-source Auth Providers that may fit your need:
99

1010
<div class="providers-list" markdown="1">
11+
- ![Apisix logo](./img/backend-logos/apisix.svg "Apisix logo")**[Apache Apisix OIDC](https://apisix.apache.org/)**: [@arte/ra-apisix-oidc](https://www.npmjs.com/package/@arte/ra-apisix-oidc)
1112
- ![Appwrite Logo](./img/backend-logos/appwrite.svg "Appwrite Logo")**[Appwrite](https://appwrite.io/)**: [marmelab/ra-appwrite](https://github.com/marmelab/ra-appwrite)
1213
- ![auth0 Logo](./img/backend-logos/auth0.svg "auth0 Logo")**[Auth0 by Okta](https://auth0.com/)**: [marmelab/ra-auth-auth0](https://github.com/marmelab/ra-auth-auth0/blob/main/packages/ra-auth-auth0/Readme.md)
1314
- ![amplify Logo](./img/backend-logos/amplify.svg "amplify Logo")**[AWS Amplify](https://docs.amplify.aws)**: [MrHertal/react-admin-amplify](https://github.com/MrHertal/react-admin-amplify)

doc/5.10/DataTable.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,3 +1871,23 @@ npx jscodeshift ./path/to/src/ \
18711871
--parser=tsx \
18721872
--transform=./node_modules/ra-core/codemods/replace-Datagrid-DataTable.ts
18731873
```
1874+
1875+
Here is what the codemod will transform for you:
1876+
1877+
- Replace `<Datagrid>` with `<DataTable>`.
1878+
- Replace `rowStyle` with `rowSx`.
1879+
- Remove the `optimized` prop (which isn't necessary anymore)
1880+
- Rename the keys in `sx` prop from `"& .RaDatagrid-xxxx"` to `"& .RaDataTable-xxxx"`.
1881+
- Replace simple `<TextField>` with `<DataTable.Col>`.
1882+
- Replace simple `<NumberField>` with `<DataTable.NumberCol>`.
1883+
- Wrap all other fields in `<DataTable.Col>`, keeping `source` and `label` properties in `<DataTable.Col>`.
1884+
- Replace `Datagrid` imports by `DataTable`, and remove unused `TextField` and `NumberField` imports if they are now all replaced.
1885+
1886+
However, the codemod will **not**:
1887+
1888+
- Replace `<DatagridConfigurable>` with `<DataTable>` (column selection is now natively supported by `<DataTable>`).
1889+
- Remove the `sortBy` and `sortable` props on fields (sorting is now managed by `<DataTable.Col source>`)
1890+
- Move the `sortByOrder` prop from the field to `<DataTable.Col>`
1891+
- Replace a `<FunctionField>` child with `<DataTable.Col render>`
1892+
- Replace `<Datagrid>` from `@react-admin/ra-rbac` (and all its children). Refer to [Access Control section](#access-control) to use `<DataTable>` with `<CanAccess>`.
1893+
- Move the column styles from `<Datagrid sx>` to the individual `<DataTable.Col sx>`

doc/5.10/Edit.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ const PostEdit = () => (
413413

414414
{% endraw %}
415415

416+
**Warning**: If you set `mutationOptions` meta without [redirecting](#redirect), make sure that [`queryOptions`](#queryoptions) meta is the same, or you will have data update issues.
417+
416418
You can also use `mutationOptions` to override success or error side effects, by setting the `mutationOptions` prop. Refer to the [useMutation documentation](https://tanstack.com/query/v5/docs/react/reference/useMutation) in the react-query website for a list of the possible options.
417419

418420
Let's see an example with the success side effect. By default, when the save action succeeds, react-admin shows a notification, and redirects to the list page. You can override this behavior and pass custom success side effects by providing a `mutationOptions` prop with an `onSuccess` key:
@@ -561,6 +563,8 @@ export const PostShow = () => (
561563

562564
{% endraw %}
563565

566+
**Warning**: If you set `queryOptions` meta without [redirecting](#redirect), make sure that [`mutationOptions`](#mutationoptions) meta is the same, or you will have data update issues.
567+
564568
You can also use `queryOptions` to force a refetch on reconnect:
565569

566570
{% raw %}
@@ -596,7 +600,9 @@ const PostEdit = () => (
596600
);
597601
```
598602

599-
Note that the `redirect` prop is ignored if you set [the `mutationOptions` prop](#mutationoptions). See that prop for how to set a different redirection path in that case.
603+
Note that the `redirect` prop is ignored if you set an `onSuccess` callback of [the `mutationOptions` prop](#mutationoptions). See that prop for how to set a different redirection path in that case.
604+
605+
**Warning**: If you set [`queryOptions`](#queryoptions) meta without redirecting, make sure that [`mutationOptions`](#mutationoptions) meta is the same, or you will have data update issues.
600606

601607
## `render`
602608

doc/5.10/Scheduler.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,19 @@ It uses all the available horizontal and vertical space in the layout's content
6161

6262
In addition to the props accepted by [Bryntum Scheduler](https://www.bryntum.com/products/scheduler/docs/guide/Scheduler/quick-start/react/), `<Scheduler>` accepts the following props:
6363

64-
| Prop | Required | Type | Default | Description |
65-
| ------------------- | -------- | --------- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
66-
| `actions` | Optional | ReactNode | | A component displayed on top of the scheduler, usually to display a toolbar with action buttons |
67-
| `converters` | Optional | object | | An object containing converters from dataProvider records to Bryntum models and vice-versa |
68-
| `CreateDialogProps` | Optional | object | | Props to pass to the `<CreateDialog>` used to create new events |
69-
| `EditDialogProps` | Optional | object | | Props to pass to the `<EditDialog>` used to edit existing events |
70-
| `eventCreate` | Optional | ReactNode | | The form used to create new events |
71-
| `eventEdit` | Optional | ReactNode | | The form used to edit existing events |
72-
| `eventName` | Optional | string | | The name of the resource for _Events_ |
73-
| `mutationOptions` | Optional | object | | The mutation options sent when updating _Events_ via drag/drop or resize and _Resources_ via the inline editor |
74-
| `resourcesName` | Optional | string | 'resources' | The name of the resource for _Resources_ |
75-
| `queryOptions` | Optional | object | | The query options sent when fetching _Events_ and _Resources_ |
76-
| `sx` | Optional | object | | The sx prop passed down to the wrapping `<div>` element |
77-
| `title` | Optional | object | | The title to display in the `<AppBar>` |
64+
| Prop | Required | Type | Default | Description |
65+
|---------------------| -------- | --------- |------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
66+
| `actions` | Optional | ReactNode | | A component displayed on top of the scheduler, usually to display a toolbar with action buttons |
67+
| `converters` | Optional | object | | An object containing converters from dataProvider records to Bryntum models and vice-versa |
68+
| `CreateDialogProps` | Optional | object | | Props to pass to the `<CreateDialog>` used to create new events |
69+
| `EditDialogProps` | Optional | object | | Props to pass to the `<EditDialog>` used to edit existing events |
70+
| `eventCreate` | Optional | ReactNode | | The form used to create new events |
71+
| `eventEdit` | Optional | ReactNode | | The form used to edit existing events |
72+
| `mutationOptions` | Optional | object | | The mutation options sent when updating _Events_ via drag/drop or resize and _Resources_ via the inline editor |
73+
| `resources` | Optional | object | `{ resources: "resources", events: "events" }` | The resources names to use for _Events_ and _Resources_ |
74+
| `queryOptions` | Optional | object | | The query options sent when fetching _Events_ and _Resources_ |
75+
| `sx` | Optional | object | | The sx prop passed down to the wrapping `<div>` element |
76+
| `title` | Optional | object | | The title to display in the `<AppBar>` |
7877

7978
## `actions`
8079

doc/5.10/Theming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const App = () => (
121121

122122
React-admin comes with 5 built-in themes:
123123

124-
| &nbsp;&nbsp; [Default](./AppTheme.md#default) [![Default light theme](./img/defaultLightTheme1.jpg)]((AppTheme.html#default)) | &nbsp;&nbsp; [B&W](./AppTheme.md#bw) [![B&W light theme](./img/bwLightTheme1.jpg)](./AppTheme.html#bw) |
124+
| &nbsp;&nbsp; [Default](./AppTheme.md#default) [![Default light theme](./img/defaultLightTheme1.jpg)](AppTheme.html#default) | &nbsp;&nbsp; [B&W](./AppTheme.md#bw) [![B&W light theme](./img/bwLightTheme1.jpg)](./AppTheme.html#bw) |
125125
| &nbsp;&nbsp; [Nano](./AppTheme.md#nano) [![Nano light theme](./img/nanoLightTheme1.jpg)](./AppTheme.html#nano) | &nbsp;&nbsp; [Radiant](./AppTheme.md#radiant) [![Radiant light theme](./img/radiantLightTheme1.jpg)](./AppTheme.html#radiant) |
126126
| &nbsp;&nbsp; [House](./AppTheme.md#house) [![House light theme](./img/houseLightTheme1.jpg)](./AppTheme.html#house) |
127127

0 commit comments

Comments
 (0)