Skip to content

Commit

Permalink
fix(form): fix ProFormPage submit error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Jan 15, 2024
1 parent 4a21fdf commit cf32be9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/form/src/layouts/LoginFormPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function LoginFormPage<T = Record<string, any>>(
searchConfig: {
submitText: intl.getMessage('loginForm.submitText', '登录'),
},
render: (_, dom) => dom.pop(),
render: (_, dom) => dom.at(0),
...proFormProps.submitter,
submitButtonProps: genSubmitButtonProps(),
} as ProFormProps['submitter'];
Expand Down
5 changes: 3 additions & 2 deletions tests/form/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16674,11 +16674,12 @@ exports[`form demos > 📸 renders ./packages/form/src/components/LoginForm/demo
</a>
</div>
<button
class="ant-btn ant-btn-default"
class="ant-btn ant-btn-primary ant-btn-lg"
style="width: 100%;"
type="button"
>
<span>
重 置
登 录
</span>
</button>
</form>
Expand Down

0 comments on commit cf32be9

Please sign in to comment.