File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
client/modules/IDE/components/Searchbar Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -23,25 +23,19 @@ class Searchbar extends React.Component {
2323 } ) ;
2424 }
2525
26- handleSearchEnter = ( e ) => {
27- if ( e . key === 'Enter' ) {
28- this . searchChange ( ) ;
29- }
30- }
26+ // handleSearchEnter = (e) => {
27+ // if (e.key === 'Enter') {
28+ // this.searchChange();
29+ // }
30+ // }
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
@@ -58,7 +52,7 @@ class Searchbar extends React.Component {
5852 value = { searchValue }
5953 placeholder = { this . props . searchLabel }
6054 onChange = { this . handleSearchChange }
61- onKeyUp = { this . handleSearchEnter }
55+ // onKeyUp={this.handleSearchEnter}
6256 />
6357 < button
6458 className = "searchbar__clear-button"
You can’t perform that action at this time.
0 commit comments