fix: show the existing field meta when editing a template fields (#1323)

Fixes #1259. I literally just used the exact same line of code than from
the document page so it is consistent.

The bug is extremely frustrating because if you make change to the
fields meta on the template and refresh the page, you can't see field
meta (label, default value, required), and neither do your co-workers.

Of course, I tested the change and it now displays correctly the
existing field meta on the template page.
This commit is contained in:
Etrenak
2024-09-05 06:10:17 +02:00
committed by GitHub
parent 921617b905
commit ad4cff937d
3 changed files with 29 additions and 28 deletions

View File

@ -112,6 +112,7 @@ export const AddTemplateFieldsFormPartial = ({
recipients.find((recipient) => recipient.id === field.recipientId)?.email ?? '',
signerToken:
recipients.find((recipient) => recipient.id === field.recipientId)?.token ?? '',
fieldMeta: field.fieldMeta ? ZFieldMetaSchema.parse(field.fieldMeta) : undefined,
})),
},
});