Seed Support #56
1 changed files with 13 additions and 11 deletions
|
@ -98,9 +98,9 @@ let WunderBar = React.createClass({
|
|||
}
|
||||
// this._input.value = ""; //trigger placeholder
|
||||
this._focusPending = true;
|
||||
if (!this.state.address.match(/^lbry:\/\//)) //onFocus, if they are not on an exact URL, clear the bar
|
||||
if (!this.state.address.startsWith('lbry://')) //onFocus, if they are not on an exact URL, clear the bar
|
||||
{
|
||||
newState.address = "";
|
||||
newState.address = '';
|
||||
}
|
||||
this.setState(newState);
|
||||
},
|
||||
|
@ -119,16 +119,18 @@ let WunderBar = React.createClass({
|
|||
this._input = ref;
|
||||
},
|
||||
render: function() {
|
||||
return <div className={"wunderbar" + (this.state.isActive ? " wunderbar--active" : "")}>
|
||||
return (
|
||||
<div className={'wunderbar' + (this.state.isActive ? ' wunderbar--active' : '')}>
|
||||
{this.state.icon ? <Icon fixed icon={this.state.icon} /> : '' }
|
||||
<input className="wunderbar__input" type="search" placeholder="Type a LBRY address or search term"
|
||||
ref={this.onReceiveRef}
|
||||
onFocus={this.onFocus}
|
||||
onBlur={this.onBlur}
|
||||
onChange={this.onChange}
|
||||
value={ this.state.address }
|
||||
value={this.state.address}
|
||||
placeholder="Find movies, music, games, and more" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue