From a1383e28dc6ea280325493f8d1177f65aac7d140 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Sat, 24 Dec 2022 23:43:16 +0800 Subject: [PATCH] fix(table): no render onSearch will SearchProps has onSearch close https://github.com/ant-design/pro-components/issues/5780 --- packages/table/src/components/ListToolBar/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/table/src/components/ListToolBar/index.tsx b/packages/table/src/components/ListToolBar/index.tsx index b92d95142eac..31eae0378da5 100644 --- a/packages/table/src/components/ListToolBar/index.tsx +++ b/packages/table/src/components/ListToolBar/index.tsx @@ -175,7 +175,9 @@ const ListToolBar: React.FC = ({ placeholder={placeholder} {...(search as SearchProps)} onSearch={(...restParams) => { - onSearch?.(restParams?.[0]); + if (!(search as SearchProps).onSearch) { + onSearch?.(restParams?.[0]); + } (search as SearchProps).onSearch?.(...restParams); }} />