Skip to content

When Inputs have prop disabled={false}, SaveButton is disabled and dirtyFields is not working as expected. #10613

Open
@utku656

Description

@utku656

When Input have prop as disabled={false} , it renders component again , reset defaultValues . It is causing a bug , dirtyFields are not working as expected.

What you were expecting:
SaveButton should work as expected.When form input is touched , savebutton should be enabled.

What happened instead:
SaveButton is disabled when there is touched input.

Steps to reproduce:
Add disabled={false} to Inputs in Create page .Then write to this input , you will see that SaveButton is disabled in Create page. You can see it in image that i added. It is also causing a bug in Edit page too.

Image

Other information:

Environment

  • React-admin version:5.6.4
  • Last version that did not exhibit the issue (if applicable):
  • React version:18
  • Browser:Chrome
  • Stack trace (in case of a JS error):

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions