Skip to content

Commit

Permalink
Merge pull request #10277 from marmelab/update-autosave-documentation
Browse files Browse the repository at this point in the history
[Doc] Warn about `<AutoSave>` incompatibility with `warnWhenUnsavedChanges`
  • Loading branch information
fzaninotto authored Oct 15, 2024
2 parents dbe4c42 + beb125a commit 7f34d1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/AutoSave.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Note that you **must** set the `<Form resetOptions>` prop to `{ keepDirtyValues:

If you're using it in an `<Edit>` page, you must also use a `pessimistic` or `optimistic` [`mutationMode`](https://marmelab.com/react-admin/Edit.html#mutationmode) - `<AutoSave>` doesn't work with the default `mutationMode="undoable"`.

Note that `<AutoSave>` does not currently work with [`warnWhenUnsavedChanges`](http://react-admin.garcia.cloud/Forms.html#warning-about-unsaved-changes).

{% raw %}
```tsx
import { AutoSave } from '@react-admin/ra-form-layout';
Expand Down

0 comments on commit 7f34d1e

Please sign in to comment.