diff --git a/packages/core/client/src/schema-component/antd/pagination/index.tsx b/packages/core/client/src/schema-component/antd/pagination/index.tsx index 674dedb262..6344e9a70a 100644 --- a/packages/core/client/src/schema-component/antd/pagination/index.tsx +++ b/packages/core/client/src/schema-component/antd/pagination/index.tsx @@ -1,6 +1,6 @@ import { observer } from '@formily/react'; import { Pagination as AntdPagination } from 'antd'; -import React from 'react'; +import React, { KeyboardEventHandler } from 'react'; import { useProps } from '../../hooks/useProps'; export const Pagination = observer((props: any) => { @@ -8,5 +8,15 @@ export const Pagination = observer((props: any) => { if (hidden) { return null; } - return ; + const onKeypress: KeyboardEventHandler = (e) => { + if (e.key === 'Enter') { + e.preventDefault(); + } + }; + + return ( +
+ ; +
+ ); });