Skip to content
Discussion options

You must be logged in to vote

Again noone answered so i came up to this solution with useEffect:
It seems that classic useForm has special prop value, however in Mantine's useForm there is no alternative. I used useEffect to update values:

useEffect(() => {
    if (isSuccess && latestRecord) {
      form.setValues({'recordInstitutions' : latestRecord});
      form.resetDirty({'recordInstitutions' : latestRecord});
    }
  }, [isSuccess, latestRecord]); // I removed `form` dependency to avoid infinite loop

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Gus007-BR
Comment options

Answer selected by skorphil
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants