Replies: 3 comments 1 reply
-
+1. I have the same question! Is there any official solution for this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1, it's really annoying to You can set them on the form object using |
Beta Was this translation helpful? Give feedback.
1 reply
-
With some restructuring, you can pass an updater function to So instead of this.form.setFieldValue('firstName', 'tony');
this.form.setFieldValue('lastName', 'stanza'); You'd have this.form.setFieldValue('person', (previous) => ({...previous, firstName: 'tony', lastName: 'stanza'})) |
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.
-
Angular forms have a
patchValue
api. This allows you to to updaten
number of fields in the form.This is useful when you are editing a form, loading an entity from the server, and want to set all the values (patch). Looking at the current API, this would be a manual process.
FWIW -- #613 is kind of related. I'm not sure if
update
is supposed to accomplish this task? Is there a vision of how to accomplish this with tanstack?Beta Was this translation helpful? Give feedback.
All reactions