Replies: 5 comments
-
could you save your codesandbox? it's empty will take a look at that first, in case it's a bug. |
Beta Was this translation helpful? Give feedback.
-
oh sorry I didn't save :( I'll create it again soon |
Beta Was this translation helpful? Give feedback.
-
https://codesandbox.io/s/useformstate-issue-rhpxvm?file=/src/index.js
Besides, I noticed that the lastname field(Controller) is missing in the form state |
Beta Was this translation helpful? Give feedback.
-
you never register an input with |
Beta Was this translation helpful? Give feedback.
-
I am going to convert this into a discussion question, we can discuss there if there is any need to introduce a new feature 👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version Number
7.33.1
Is your feature request related to a problem? Please describe.
I would like this hook to be able to return the state of the form by index, for example if we pass such a name
useFormState({
control, name: "test.0" OR "test.0.lastName",
});
as the getFieldState function do it
Describe the solution you'd like
Now I'm going use getFieldState but would be great if useFormState hook has this able
Reproduce
Besides, I noticed that the lastname field(Controller) is missing in the form state
Additional context
Here is an example:
https://codesandbox.io/s/useformstate-issue-rhpxvm?file=/src/index.js
i am trying to get formState by name with index but i get all formState. We can see in console. Maybe it's a bug
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions