We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dab1e53 commit 9470fd1Copy full SHA for 9470fd1
client/modules/IDE/components/Searchbar/Searchbar.jsx
@@ -30,18 +30,12 @@ class Searchbar extends React.Component {
30
}
31
32
searchChange = () => {
33
- if (this.state.searchValue.trim().length === 0) return;
34
this.props.setSearchTerm(this.state.searchValue.trim());
35
};
36
37
handleSearchChange = (e) => {
38
- if (e.target.value === '') {
39
- // Manually reset the searchValue if the search field becomes empty.
40
- this.handleResetSearch();
41
- return;
42
- }
43
this.setState({ searchValue: e.target.value }, () => {
44
- this.throttledSearchChange(this.state.searchValue);
+ this.throttledSearchChange(this.state.searchValue.trim());
45
});
46
47
0 commit comments