Skip to content

Commit

Permalink
chore: opt table search on close
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Oct 14, 2024
1 parent f059875 commit 7d0d655
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/components/table-container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ export const TableContainer: React.FC<TableContainerProps> = (
const onSearchBtnClick = () => {
setOpenSearch(!openSearch);
if (openSearch) {
setSearch("");
setSearch1("");
if (props.onSearchChange) {
props.onSearchChange("");
if (search.length > 0) {
setSearch("");
setSearch1("");
if (props.onSearchChange) {
props.onSearchChange("");
}
}
} else {
setTimeout(() => {
Expand Down

0 comments on commit 7d0d655

Please sign in to comment.