diff --git a/docs/Inputs.md b/docs/Inputs.md index 88b55b9ae71..663eb97c02b 100644 --- a/docs/Inputs.md +++ b/docs/Inputs.md @@ -510,7 +510,7 @@ import { FormDataConsumer } from 'react-admin'; const PostEdit = () => ( - + {({ formData, ...rest }) => formData.hasEmail && @@ -522,25 +522,7 @@ import { FormDataConsumer } from 'react-admin'; ); ``` -**Important**: By default `react-hook-form` submits values of unmounted input components, so if you don't want this behaivour you can set `shouldUnregister` prop to `true` in the form - -```diff -import { FormDataConsumer } from 'react-admin'; - - const PostEdit = () => ( - -- -+ - - - {({ formData, ...rest }) => formData.hasEmail && - - } - - - - ); -``` +**Important**: By default `react-hook-form` submits values of unmounted input components, to prevent this from happen in the above example, `shouldUnregister` prop was set to `true` in the `` ## Overriding The Input Variant diff --git a/docs/ListBase.md b/docs/ListBase.md index ff61920ee53..cbd538ca3d4 100644 --- a/docs/ListBase.md +++ b/docs/ListBase.md @@ -63,4 +63,4 @@ The `` component accepts the same props as [`useListController`](./use * [`resource`](./List.md#resource) * [`sort`](./List.md#sort-default-sort-field--order) -These are a subset of the props accepted by `` - only the props that change data fetching, and not the props related to the user interface. \ No newline at end of file +These are a subset of the props accepted by `` - only the props that change data fetching, and not the props related to the user interface.