From 0bd82992d105baa5302c922d94c40c8dbf8eed12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Koz=C5=82owski?= <60754055+Szulerinio@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:20:21 +0100 Subject: [PATCH] fix jekyll trying to parse jsx code - mutation options --- docs/Edit.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Edit.md b/docs/Edit.md index d16c8a90860..3a98287d5f7 100644 --- a/docs/Edit.md +++ b/docs/Edit.md @@ -365,6 +365,7 @@ The default `onSuccess` function is: **Tip**: When you use `mutationMode="pessimistic"`, the `onSuccess` function receives the response from the `dataProvider.update()` call, which is the created/edited record (see [the dataProvider documentation for details](./DataProviderWriting.md#response-format)). You can use that response in the success side effects: +{% raw %} ```jsx import * as React from 'react'; import { useNotify, useRefresh, useRedirect, Edit, SimpleForm } from 'react-admin'; @@ -389,6 +390,7 @@ const PostEdit = () => { ); } ``` +{% endraw %} **Tip**: If you want to have different success side effects based on the button clicked by the user (e.g. if the creation form displays two submit buttons, one to "save and redirect to the list", and another to "save and display an empty form"), you can set the `mutationOptions` prop on [the `` component](./SaveButton.md), too.