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
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:
- 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>`
Copy file name to clipboardExpand all lines: Edit.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -413,6 +413,8 @@ const PostEdit = () => (
413
413
414
414
{% endraw %}
415
415
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
+
416
418
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.
417
419
418
420
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:
**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
+
564
568
You can also use `queryOptions` to force a refetch on reconnect:
565
569
566
570
{% raw %}
@@ -596,7 +600,9 @@ const PostEdit = () => (
596
600
);
597
601
```
598
602
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.
Copy file name to clipboardExpand all lines: Scheduler.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,20 +61,19 @@ It uses all the available horizontal and vertical space in the layout's content
61
61
62
62
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:
|`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>`|
|`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>`|
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:
- 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>`
Copy file name to clipboardExpand all lines: doc/5.10/Edit.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -413,6 +413,8 @@ const PostEdit = () => (
413
413
414
414
{% endraw %}
415
415
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
+
416
418
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.
417
419
418
420
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:
**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
+
564
568
You can also use `queryOptions` to force a refetch on reconnect:
565
569
566
570
{% raw %}
@@ -596,7 +600,9 @@ const PostEdit = () => (
596
600
);
597
601
```
598
602
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.
Copy file name to clipboardExpand all lines: doc/5.10/Scheduler.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,20 +61,19 @@ It uses all the available horizontal and vertical space in the layout's content
61
61
62
62
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:
|`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>`|
|`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>`|
0 commit comments