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: calling setValue breaks future onChange calls from a Controller #9709

Closed
1 task done
tkolanko opened this issue Jan 3, 2023 · 1 comment · Fixed by #9710
Closed
1 task done

issue: calling setValue breaks future onChange calls from a Controller #9709

tkolanko opened this issue Jan 3, 2023 · 1 comment · Fixed by #9710
Labels
bug Something isn't working status: under investigation aware of this issue and pending for investigation

Comments

@tkolanko
Copy link

tkolanko commented Jan 3, 2023

Version Number

7.41.3

It appears this broke in 7.41.2, it works in 7.41.1

Codesandbox/Expo snack

https://codesandbox.io/s/dawn-glade-g2bibl?file=/src/App.js

Steps to reproduce

  1. Go to https://codesandbox.io/s/dawn-glade-g2bibl?file=/src/App.js
  2. Change the select dropdown from one to two
  3. Enter a value for the username
  4. Submit the form

An error appears that the username is required, however, if you look at the console output username has a value

Expected behaviour

Calling setValue does not break future onChange calls

if I switch from setValue to reset then things work as expected, however, we make heavy use of setValue in a number of locations on some complex forms.

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
@Moshyfawn
Copy link
Member

@tkolanko a workaround for now is to downgrade to 7.41.1

@Moshyfawn Moshyfawn added bug Something isn't working status: under investigation aware of this issue and pending for investigation labels Jan 3, 2023
bluebill1049 added a commit that referenced this issue Jan 3, 2023
* WIP 🐛fix(Validation): remove ref.value check

Closes: #9709

* Update validateField.ts

* Update validateField.ts

* Update validateField.test.tsx

* Update validateField.test.tsx

Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working status: under investigation aware of this issue and pending for investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants