Skip to content

Commit

Permalink
Merge pull request #11354 from hzh11012/mater-input-table-fix
Browse files Browse the repository at this point in the history
fix: input-table确认模式下进行新增时,若只配置编辑接口,不配置新增接口,会导致新增确认时调用编辑接口
  • Loading branch information
hsm-lv authored Dec 13, 2024
2 parents e6df4d4 + 15d5bb2 commit 3363c12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/amis/src/renderers/Form/InputTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ export default class FormTable<
if (isNew && isEffectiveApi(addApi, createObject(data, item))) {
remote = await env.fetcher(addApi, createObject(data, item));
apiMsg = (addApi as ApiObject)?.messages?.failed;
} else if (isEffectiveApi(updateApi, createObject(data, item))) {
} else if (!isNew && isEffectiveApi(updateApi, createObject(data, item))) {
remote = await env.fetcher(updateApi, createObject(data, item));
apiMsg = (updateApi as ApiObject)?.messages?.failed;
}
Expand Down

0 comments on commit 3363c12

Please sign in to comment.