Skip to content

Commit

Permalink
fix(form): 初始化values时,数组中的对象出现key丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen authored and jia000 committed Jun 29, 2022
1 parent fd1fea2 commit 32e86d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/form/src/utils/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const initItemsValue = (
{ items, name, extensible }: any,
) => {
if (Array.isArray(initValue[name])) {
value[name] = initValue[name].map((v: any) => init(mForm, items, v));
value[name] = initValue[name].map((v: any, index: number) => init(mForm, items, v, value[name]?.[index]));
} else {
value[name] = init(mForm, items, initValue[name], value[name]);
if (extensible) {
Expand Down

0 comments on commit 32e86d8

Please sign in to comment.