Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: breaking change with controller disabled feature #10932

Closed
1 task done
davbrito opened this issue Sep 14, 2023 · 1 comment · Fixed by #10937
Closed
1 task done

issue: breaking change with controller disabled feature #10932

davbrito opened this issue Sep 14, 2023 · 1 comment · Fixed by #10937
Labels
question Further information is requested

Comments

@davbrito
Copy link

Version Number

7.46.1

Codesandbox/Expo snack

https://codesandbox.io/s/nervous-leakey-vdz6hp

Steps to reproduce

  1. Add a controlled input with Controller
  2. On the render of the Controller pass the "field" object as a spread
  3. Add a "disabled" prop on the input before the field spread
  4. See how disabled is passed as undefined to the component
  5. See on the console how the field object has a "disabled" property with the value undefined
    image

Expected behaviour

For backwards compatibility on the same major version, the field object should not have the disabled property when it is undefined. This way the code that passes a disabled prop directly to the controlled component won´t be affected by this change.

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bluebill1049
Copy link
Member

What's breaking here? The prop itself is undefined. We are going to revert this change, the least we can do is update the change log.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants