Merge branch 'main' into exp/autoplace-fields

This commit is contained in:
Ephraim Duncan
2025-11-19 00:44:51 +00:00
committed by GitHub
213 changed files with 1920 additions and 1439 deletions

View File

@ -170,10 +170,15 @@ export const useEditorFields = ({
);
const setFieldId = (formId: string, id: number) => {
const index = localFields.findIndex((field) => field.formId === formId);
const { fields } = form.getValues();
const index = fields.findIndex((field) => field.formId === formId);
if (index !== -1) {
form.setValue(`fields.${index}.id`, id);
update(index, {
...fields[index],
id,
});
}
};