Skip to content

issue: Clearing a value that is an object does not remove the value from useController #13550

Description

@Oktay28

Version Number

7.79.0

Codesandbox/Expo snack

https://codesandbox.io/p/sandbox/yrk669

Steps to reproduce

  1. click on "clear" button
  2. the "plain" input gets cleared
  3. the object one "data.type" does not

Expected behaviour

When the value is an object and I set it to null, the useControllers that are subscribed to its properties to be null too. Currently the form values are out of sync with the value from useController.
The values from useWatch and useController are different

What browsers are you seeing the problem on?

Chrome

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions