getValues('fieldArray') doesn't seem to work inside of event handler
See original GitHub issueDescribe the bug
When using useFieldArray
, getValues('fieldArray')
returns undefined
inside of an event handler. But getValues().fieldArray
returns the array though. 😅
To Reproduce Steps to reproduce the behavior:
- Click on ‘Append’.
- See log in the console.
Codesandbox link (Required) https://codesandbox.io/s/react-hook-form-usefieldarray-template-forked-erbwu?file=/src/index.js:1575-1702
Expected behavior
getValues('fieldArray')
should returns the same thing as getValues().fieldArray
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
getValues('field') returns undefined combined with Form.List ...
When combining getValues and Form.List , getValues('names') returns undefined instead of the array itself. enter image description here.
Read more >Using React Hook Form to Handle Field Array in a Modal Form
Using React Hook Form to Handle Field Array in a Modal Form#ionic #reacthookform #tutorialThis is a continuation of a previous video where I ......
Read more >Form - Ant Design
High performance Form component with data scope management. Including data collection, verification, and styles. When to use.
Read more >useFieldArray - Simple React forms validation
Performant, flexible and extensible forms with easy-to-use validation.
Read more >No-Codifying Info and Error Messages - ServiceNow Community
Popups seem like one of those things that really shouldn't require a ... attach the same event handler script to each field on...
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
I will take a look this useWatch inconsistency tmr.
Sure! 😃 Would be glad to try to reconstruct this on CSB. I’ll work on it sometime this week~