react-hook-form / devtools

📋 DevTools to help debug forms.
https://react-hook-form.com/dev-tools
MIT License
646 stars 47 forks source link

DevTools doesn't show the whole form context #191

Open GalPayEm opened 1 year ago

GalPayEm commented 1 year ago

Hey,

I dont know if this is an issue or feature request... Long story short - I have a field which I dynamically create behind the scenes - A SetValue that isn't part of the UI itself. the devtool currently shows only the fields that are on the screen at a particular moment.

Is there a way to also add any values that aren't on the screen but are retrieved through "getValues"?

BigSamu commented 1 month ago

Same question. In my case I am setting some values of the form using setValue. What I have are options that are tighley coupled. For instance

someField = {
    id: string
    value: name
}

In that schema only one id will have only one respective name and viceverse. What I do is just to select in an Autocomplete Box an option that that traduce someField.id, and then set the field of the Autocomplete form using setValues() with field name someField .id as follow:

setValue(someField .name, "name")

It would be great that DevTools can show all values being set. Not only the ones that are actually rendered in the UI.