From 2f7d1126a1bcc768ae6314f8a2f7e8e13ac6082b Mon Sep 17 00:00:00 2001 From: fzaninotto Date: Tue, 24 Oct 2023 17:01:41 +0200 Subject: [PATCH 1/2] [Doc] Add gotcha about `` usage and `isDirty` form state Since `react-hook-form` v7.46.0, a `disabled` input makes the form dirty. This isn't going to change, so we may as well warn our users about it. --- docs/Features.md | 6 ++++-- docs/Inputs.md | 8 ++++++++ docs/Readme.md | 4 ++-- docs/Tutorial.md | 4 +++- examples/simple/src/comments/CommentEdit.tsx | 6 +++++- examples/simple/src/posts/PostEdit.tsx | 7 +++++-- examples/simple/src/users/UserEdit.tsx | 4 +++- 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/docs/Features.md b/docs/Features.md index 352fdbe7b1e..0451ef0ddff 100644 --- a/docs/Features.md +++ b/docs/Features.md @@ -426,6 +426,7 @@ React-admin offers a **rich set of input components and form layouts** to build For instance, here is how to build a tabbed form for editing a blog post: +{% raw %} ```jsx import { TabbedForm, @@ -445,7 +446,7 @@ export const PostEdit = () => ( - + @@ -457,7 +458,7 @@ export const PostEdit = () => ( - + @@ -472,6 +473,7 @@ export const PostEdit = () => ( ); ``` +{% endraw %}