fixed search result reset issue
This commit is contained in:
parent
d37c552144
commit
e299bf2a39
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,11 @@ class Searchbar extends React.Component {
|
|||
};
|
||||
|
||||
handleSearchChange = (e) => {
|
||||
if (e.target.value === '') {
|
||||
// Manually reset the searchValue if the search field becomes empty.
|
||||
this.handleResetSearch();
|
||||
return;
|
||||
}
|
||||
this.setState({ searchValue: e.target.value }, () => {
|
||||
this.throttledSearchChange(this.state.searchValue);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue