Skip to content

Commit

Permalink
fix(table): no render onSearch will SearchProps has onSearch
Browse files Browse the repository at this point in the history
close #5780
  • Loading branch information
chenshuai2144 committed Dec 27, 2022
1 parent 53699f8 commit a1383e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/table/src/components/ListToolBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ const ListToolBar: React.FC<ListToolBarProps> = ({
placeholder={placeholder}
{...(search as SearchProps)}
onSearch={(...restParams) => {
onSearch?.(restParams?.[0]);
if (!(search as SearchProps).onSearch) {
onSearch?.(restParams?.[0]);
}
(search as SearchProps).onSearch?.(...restParams);
}}
/>
Expand Down

0 comments on commit a1383e2

Please sign in to comment.