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 1566561 commit c4fb567Copy full SHA for c4fb567
src/js/components/search-input.js
@@ -21,9 +21,17 @@ var SearchInput = React.createClass({
21
},
22
23
render: function () {
24
+ var clearSearchIcon;
25
+
26
+ if (this.state.searchTerm) {
27
+ clearSearchIcon = (
28
+ <span className='octicon octicon-x' onClick={this.clearSearch} />
29
+ );
30
+ }
31
32
return (
33
<div className='search-wrapper'>
- <span className='octicon octicon-x' onClick={this.clearSearch} />
34
+ {clearSearchIcon}
35
<input
36
value={this.state.searchTerm}
37
onChange={this.onChange}
0 commit comments