Skip to content

issue: isDirty keep false after reset - using Field Array and append with class object #10678

Answered by leapful
jeffwong14 asked this question in Q&A
Discussion options

You must be logged in to vote

@jeffwong14

Not sure why you need to use class object for field array but it will not be compatible with clone value handling from react-hook-form. The fallback for case cloning is not possible will be return the original object and that is the root cause of wrong dirty check.

You need to transform class object into plain javascript object before put it into append method.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jeffwong14
Comment options

Answer selected by jeffwong14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #10677 on July 16, 2023 11:05.