Replies: 1 comment
-
not to mention that setting form values in bulk inside a method named "reset()" does not really sounds like it is a correct thing to do, its not very intuitive and makes you think twice about it being the correct thing to do or not since you just wanted to set the form values and not anything more than that. i do not foresee why they do not have a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there, I have a form here and its quite peculiar.. like a calculator. My problem is the following:
User can update some number inputs A, B or C and on the blur I need to call some API that will return new values for many other fields (lets call them calculated fields) D, E, F, G etc based on A , B or C values. I want to update my form with those values but I do NOT want to set those updated fields as
dirty
because the user hasn't manually changed them it was a system update (yes, triggered by the user but my point stills, I dont want them dirty.. I need to have control over the field state and to know if user changed it manually or not)My current workaround is setting each calculated field individually with
{ shouldDirty: false }
but that is ugly and seems pretty weird.Is there any reason why we don't have a bulk
setValues
or an option to NOT re-evaluate theisDirty
when callingreset
?Beta Was this translation helpful? Give feedback.
All reactions