Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Commit

Permalink
πŸ› bug: fix toolbar second search doesn't work (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatthehan authored Jul 22, 2020
1 parent 57ec2fe commit 4b1307a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions docs/example/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,14 @@ export default () => {
if (!params.keyWord) {
return true;
}
if (item.name.includes(params.keyWord) || item.status.includes(params.keyWord)) {
return true;
}
return false;
return item.name.includes(params.keyWord) || item.status.includes(params.keyWord);
}),
success: true,
})
}
options={{
search: {
name: 'qixian',
name: 'keyWord',
},
}}
rowKey="key"
Expand Down
2 changes: 1 addition & 1 deletion src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,8 @@ const ProTable = <T extends {}, U extends object>(
}
: options.search;
setFormSearch({
[name]: keyword,
...formSearch,
[name]: keyword,
});
}
}}
Expand Down

0 comments on commit 4b1307a

Please sign in to comment.