Skip to content

Commit 6e14fc3

Browse files
authored
Merge pull request #6466 from WiXSL/docs-samples-syntax
[Doc] Improve Submission Validation example
2 parents d8de73f + 76f6c4d commit 6e14fc3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/CreateEdit.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,9 @@ The form can be validated by the server after its submission. In order to displa
14941494

14951495
{% raw %}
14961496
```jsx
1497-
import { useMutation } from 'react-admin';
1497+
import * as React from 'react';
1498+
import { useCallback } from 'react';
1499+
import { Create, SimpleForm, TextInput, useMutation } from 'react-admin';
14981500

14991501
export const UserCreate = (props) => {
15001502
const [mutate] = useMutation();
@@ -1516,7 +1518,7 @@ export const UserCreate = (props) => {
15161518
);
15171519

15181520
return (
1519-
<Create undoable={false} {...props}>
1521+
<Create {...props}>
15201522
<SimpleForm save={save}>
15211523
<TextInput label="First Name" source="firstName" />
15221524
<TextInput label="Age" source="age" />
@@ -2033,6 +2035,7 @@ const defaultSubscription = {
20332035
pristine: true,
20342036
valid: true,
20352037
invalid: true,
2038+
validating: true,
20362039
};
20372040
```
20382041
{% endraw %}

0 commit comments

Comments
 (0)