Skip to content

Commit 9470fd1

Browse files
committed
[#1512] Update searchbar to query with empty term
1 parent dab1e53 commit 9470fd1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,12 @@ class Searchbar extends React.Component {
3030
}
3131

3232
searchChange = () => {
33-
if (this.state.searchValue.trim().length === 0) return;
3433
this.props.setSearchTerm(this.state.searchValue.trim());
3534
};
3635

3736
handleSearchChange = (e) => {
38-
if (e.target.value === '') {
39-
// Manually reset the searchValue if the search field becomes empty.
40-
this.handleResetSearch();
41-
return;
42-
}
4337
this.setState({ searchValue: e.target.value }, () => {
44-
this.throttledSearchChange(this.state.searchValue);
38+
this.throttledSearchChange(this.state.searchValue.trim());
4539
});
4640
}
4741

0 commit comments

Comments
 (0)