Skip to content

Commit d07aed5

Browse files
authored
Merge pull request #11365 from marmelab/doc/ra-core-ee-67e987f5a508e2c2b41007b2ec71a1a481093b74
[Doc] Update RA Core EE documentation
2 parents 838d05e + 5775e7e commit d07aed5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎docs_headless/src/content/docs/AutoSaveBase.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The app will save the current form values after 3 seconds of inactivity.
6060
- You must set the `<Form resetOptions>` prop to `{ keepDirtyValues: true }`. If you forget that prop, any change entered by the end user after the autosave but before its acknowledgement by the server will be lost.
6161
- In an `<EditBase>` page, you must set [`mutationMode`](https://marmelab.com/ra-core/editbase/#mutationmode) to `pessimistic` or `optimistic` (`<AutoSaveBase>` doesn't work with the default `mutationMode="undoable"`).
6262
- You can't use `<Form warnWhenUnsavedChanges>` with this component. `<AutoSaveBase>` implements its own similar mechanism, and it's enabled by default. You can disable it with the [`disableWarnWhenUnsavedChanges` prop](#disablewarnwhenunsavedchanges).
63-
- It requires that you use a Data Router. This is the default for react-admin apps, but if you're using a custom router, you may need to adjust your configuration. Check the react-router documentation about [Using a Data Router with react-router v6](https://reactrouter.com/6.22.3/routers/picking-a-router) or [Using a Data Router with react-router v7](https://reactrouter.com/7.2.0/start/framework/custom).
63+
- It requires a router that supports navigation blocking. This is the case with the default router provided by react-admin. If you set up your own react-router router, it must be a [Data Router](https://reactrouter.com/6.22.3/routers/picking-a-router). Other `routerProvider` implementations expose their support through `useCanBlock()`.
6464

6565
## Props
6666

‎docs_headless/src/content/docs/useAutoSave.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Note that you **must** add the `resetOptions` prop with `{ keepDirtyValues: true
1313
**Note**: `useAutoSave` is not compatible with the default `warnWhenUnsavedChanges` prop of the react-admin form components. However, it implements its own similar mechanism which is enabled by default.
1414
You can disable it with the [`disableWarnWhenUnsavedChanges` prop](#disablewarnwhenunsavedchanges).
1515

16-
**Note**: Due to limitations in react-router, this equivalent of `warnWhenUnsavedChanges` only works if you use the default router provided by react-admin, or if you use a [Data Router with react-router v6](https://reactrouter.com/6.22.3/routers/picking-a-router) or [with react-router v7](https://reactrouter.com/7.2.0/start/framework/custom).
16+
**Note**: This equivalent of `warnWhenUnsavedChanges` needs a router that supports navigation blocking. It works with the default router provided by react-admin. If you set up your own react-router router, it must be a [Data Router](https://reactrouter.com/6.22.3/routers/picking-a-router).
1717
If not, you'll need to use the `disableWarnWhenUnsavedChanges` prop.
1818

1919
```tsx

0 commit comments

Comments
 (0)