useWatch value become empty after delete field array item
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/react-hook-form-v6-usewatch-mjnow?file=/src/index.js
- Click on append
- Click on append
- Click on delete
- See JSON output
Expected behavior A clear and concise description of what you expected to happen.
it should preserve value same as watch
Screenshots
If applicable, add screenshots to help explain your problem.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
useFieldArray - Simple React forms validation
When you append, prepend, insert and update the field array, the obj can't be empty object rather need to supply all your input's...
Read more >UsefieldArray react hook form deleting the last element only
Basically I'm trying to append and delete but the problem is when I'm deleting its deleting only the last element. append is working...
Read more >react hook form nested | The AI Search Engine You Control
The problem is when i remove a field from the array. The Handler component re-renders having correct values on the fields data. But...
Read more >Set a watch on variables - Visual Studio (Windows)
While you're debugging, you can use Watch windows and QuickWatch to watch variables and expressions. The windows are only available during a ...
Read more >Vue 3 Composition API - watch and watchEffect - This Dot Labs
This function will be automatically called whenever the value of notes changes (for example, when text is entered into the field). Each watcher ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
you will have to do
watch('xxx', fields)
i am going to add a FAQ section for this.oh wait, sorry i miss look the issue with watch API, i will take a look at it.