How to trigger 'isDirty' when we retrieve the same value when we do reset defaultvalues #11479
Unanswered
imadegautama
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Does reset(
{ name: "Tama", isProgrammer: false },
{ keepDirtyValues: true }
) |
Beta Was this translation helpful? Give feedback.
2 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.
-
for example :
the defaultValues look like this :
{
name: ""
isProgrammer : false
}
then we do reset with data like this ({name : "Tama", isProgrammer : false})
the use form will treat isProgrammer isDirty Status as false, but i want the isDirty set to true because is not possible to have value other than true or false. Additionally i use mui as the the input if i use null as the defaultValue mui will complain when the null change.
Sorry if my english bad, i am looking for the answer asap because i use this for my work project thankyou.
Beta Was this translation helpful? Give feedback.
All reactions