Skip to content

Commit

Permalink
[docs] Add use-form setValues usage with previous state explanation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
BenHakimIlyass committed Oct 30, 2022
1 parent 5291333 commit 70bc0bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/docs/form/use-form.mdx
Expand Up @@ -68,6 +68,9 @@ form.values;
// Set all form values
form.setValues(values);

// Set all form values using the previous state
form.setValues((prev) => ({ ...prev, ...values }));

// Set value of single field
form.setFieldValue('path', value);

Expand Down

0 comments on commit 70bc0bd

Please sign in to comment.