fix: update FieldUploadMulti to concatenate existing data with new uploads

This commit is contained in:
faisolavolut 2025-02-25 07:12:35 +07:00
parent af386a2b07
commit a395a34a2a
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ export const FieldUploadMulti: FC<{
}); });
} }
} }
fm.data[field.name] = list; const existing = fm.data[field.name] || [];
fm.data[field.name] = existing.concat(list);
fm.render(); fm.render();
if (typeof on_change === "function") on_change(fm.data?.[field.name]); if (typeof on_change === "function") on_change(fm.data?.[field.name]);
input.fase = "start"; input.fase = "start";