Skip to content

Commit

Permalink
fix: input-table确认模式下进行新增时,若只配置编辑接口,不配置新增接口,会导致新增确认时调用编辑接口
Browse files Browse the repository at this point in the history
  • Loading branch information
hzh11012 committed Dec 11, 2024
1 parent a50fdf9 commit 2b8f60c
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 2b8f60c

Please sign in to comment.