fixed search on enter
This commit is contained in:
@@ -41,7 +41,7 @@ var SearchBox = React.createClass({
|
||||
}
|
||||
},
|
||||
render: function() {
|
||||
var large = (<form style={ {marginLeft: '60px', width: '100%'} } className="form-inline">
|
||||
var large = (<form onSubmit={this.onSearchClick} style={ {marginLeft: '60px', width: '100%'} } className="form-inline">
|
||||
<div className="left-inner-addon">
|
||||
<i className="glyphicon glyphicon-search"></i>
|
||||
<input style={{width: '75%'}} type="search" onKeyPress={this.onKeyPress}
|
||||
@@ -57,7 +57,7 @@ var SearchBox = React.createClass({
|
||||
</div>
|
||||
</form>);
|
||||
|
||||
var small = (<form className="form-inline">
|
||||
var small = (<form onSubmit={this.onSearchClick} className="form-inline">
|
||||
<span className="left-inner-addon">
|
||||
<i style={{positon: "absolute", zIndex: "600" }} className="glyphicon glyphicon-search"></i>
|
||||
<input style={{ width: "100%"}} type="search" onKeyPress={this.onKeyPress}
|
||||
@@ -67,10 +67,10 @@ var SearchBox = React.createClass({
|
||||
|
||||
</input>
|
||||
</span>
|
||||
</form>);
|
||||
</form>);
|
||||
|
||||
if (this.props.small === 'true') {
|
||||
return small;
|
||||
return small;
|
||||
}
|
||||
else {
|
||||
return large;
|
||||
|
||||
Reference in New Issue
Block a user