Skip to content

Commit

Permalink
Merge pull request #65 from oceanprotocol/feature/reset-search-on-clear
Browse files Browse the repository at this point in the history
Fix: Reset search when input is cleared
  • Loading branch information
tom1145 authored Dec 19, 2024
2 parents 1820f8f + 1d28cdc commit d3bd0d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,14 @@ export default function Table({
const handleSearchChange = (searchValue: string) => {
if (tableType === 'countries') {
setLocalSearchTermCountry(searchValue)
if (searchValue === '') {
setCountrySearchTerm('')
}
} else {
setLocalSearchTerm(searchValue)
if (searchValue === '') {
setSearchTerm('')
}
}
}

Expand Down

0 comments on commit d3bd0d8

Please sign in to comment.