Make search not get stuck on Dewey Decimals message

This commit is contained in:
Alex Liebowitz 2016-08-09 10:58:28 -04:00
parent e1bbb7dbdf
commit eceaabb93c

View file

@ -178,8 +178,13 @@ var DiscoverPage = React.createClass({
userTypingTimer: null, userTypingTimer: null,
componentDidUpdate: function() { componentDidUpdate: function() {
if (this.props.query) if (this.props.query != this.state.query)
{ {
this.setState({
searching: true,
query: this.props.query,
});
lbry.search(this.props.query, this.searchCallback); lbry.search(this.props.query, this.searchCallback);
} }
}, },
@ -197,6 +202,7 @@ var DiscoverPage = React.createClass({
}, },
searchCallback: function(results) { searchCallback: function(results) {
console.log('results:', results)
console.log('search callback'); console.log('search callback');
console.log(this.state); console.log(this.state);
console.log(this.props); console.log(this.props);