File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed
Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ export class SearchBar extends React.Component {
1212 }
1313
1414 render ( ) {
15+ if ( ! this . props . showSearch ) {
16+ return null ;
17+ }
18+
1519 var clearSearchIcon ;
1620
1721 if ( this . props . query ) {
@@ -21,22 +25,21 @@ export class SearchBar extends React.Component {
2125 }
2226
2327 return (
24- < div className = { this . props . showSearch ? 'container-fluid search-bar' : 'container-fluid' } >
25- { this . props . showSearch ? (
26- < div className = "row" >
27- < div className = "col-xs-10" >
28- < div className = "form-group search-wrapper" >
29- < input
30- autoFocus
31- value = { this . props . query }
32- onChange = { ( evt ) => this . props . searchNotifications ( evt . target . value ) }
33- className = "form-control"
34- type = "text"
35- placeholder = " Search..." />
36- </ div >
28+ < div className = "container-fluid search-bar" >
29+ < div className = "row" >
30+ < div className = "col-xs-10" >
31+ < div className = "form-group search-wrapper" >
32+ < input
33+ autoFocus
34+ value = { this . props . query }
35+ onChange = { ( evt ) => this . props . searchNotifications ( evt . target . value ) }
36+ className = "form-control"
37+ type = "text"
38+ placeholder = " Search..." />
39+ </ div >
3740 </ div >
3841 < div className = "col-xs-2" > { clearSearchIcon } </ div >
39- </ div > ) : null }
42+ </ div >
4043 </ div >
4144 ) ;
4245 }
You can’t perform that action at this time.
0 commit comments