Skip to content

Commit e299bf2

Browse files
committed
fixed search result reset issue
1 parent d37c552 commit e299bf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

client/modules/IDE/components/Searchbar/Searchbar.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ class Searchbar extends React.Component {
3535
};
3636

3737
handleSearchChange = (e) => {
38+
if (e.target.value === '') {
39+
// Manually reset the searchValue if the search field becomes empty.
40+
this.handleResetSearch();
41+
return;
42+
}
3843
this.setState({ searchValue: e.target.value }, () => {
3944
this.throttledSearchChange(this.state.searchValue);
4045
});

0 commit comments

Comments
 (0)