POC for retaining search results, would fix #398
This commit is contained in:
@ -80485,8 +80485,8 @@ var Search = function (_React$Component) {
|
||||
}, {
|
||||
key: 'componentWillUnmount',
|
||||
value: function componentWillUnmount() {
|
||||
this.props.mopidyActions.clearSearchResults();
|
||||
this.props.spotifyActions.clearSearchResults();
|
||||
//this.props.mopidyActions.clearSearchResults();
|
||||
//this.props.spotifyActions.clearSearchResults();
|
||||
}
|
||||
}, {
|
||||
key: 'componentWillReceiveProps',
|
||||
@ -80534,11 +80534,11 @@ var Search = function (_React$Component) {
|
||||
|
||||
this.props.uiActions.setWindowTitle("Search: " + term);
|
||||
|
||||
this.props.mopidyActions.clearSearchResults();
|
||||
this.props.spotifyActions.clearSearchResults();
|
||||
|
||||
if (type && term) {
|
||||
|
||||
this.props.mopidyActions.clearSearchResults();
|
||||
this.props.spotifyActions.clearSearchResults();
|
||||
|
||||
if (provider == 'mopidy' || this.props.mopidy_connected && this.props.uri_schemes_search_enabled) {
|
||||
this.props.mopidyActions.getSearchResults(type, term);
|
||||
}
|
||||
@ -80930,8 +80930,9 @@ var Search = function (_React$Component) {
|
||||
return _this7.setState({ term: term });
|
||||
},
|
||||
onSubmit: function onSubmit(term) {
|
||||
return _this7.search(_this7.state.type, term);
|
||||
return _this7.props.history.push('/search/' + _this7.state.type + '/' + term);
|
||||
}
|
||||
//onSubmit={term => this.search(this.state.type, term)}
|
||||
}),
|
||||
_react2.default.createElement(
|
||||
'div',
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -100,7 +100,7 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
var build = "1560052320";
|
||||
var build = "1560052732";
|
||||
var version = "3.38.0";
|
||||
|
||||
// Construct the script tag
|
||||
|
||||
@ -45,8 +45,8 @@ class Search extends React.Component{
|
||||
}
|
||||
|
||||
componentWillUnmount(){
|
||||
this.props.mopidyActions.clearSearchResults();
|
||||
this.props.spotifyActions.clearSearchResults();
|
||||
//this.props.mopidyActions.clearSearchResults();
|
||||
//this.props.spotifyActions.clearSearchResults();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps){
|
||||
@ -83,11 +83,11 @@ class Search extends React.Component{
|
||||
|
||||
this.props.uiActions.setWindowTitle("Search: "+term);
|
||||
|
||||
this.props.mopidyActions.clearSearchResults();
|
||||
this.props.spotifyActions.clearSearchResults();
|
||||
|
||||
if (type && term){
|
||||
|
||||
this.props.mopidyActions.clearSearchResults();
|
||||
this.props.spotifyActions.clearSearchResults();
|
||||
|
||||
if (provider == 'mopidy' || (this.props.mopidy_connected && this.props.uri_schemes_search_enabled)){
|
||||
this.props.mopidyActions.getSearchResults(type, term)
|
||||
}
|
||||
@ -380,7 +380,8 @@ class Search extends React.Component{
|
||||
history={this.props.history}
|
||||
term={this.state.term}
|
||||
onBlur={term => this.setState({term: term})}
|
||||
onSubmit={term => this.search(this.state.type, term)}
|
||||
onSubmit={term => this.props.history.push(`/search/${this.state.type}/${term}`)}
|
||||
//onSubmit={term => this.search(this.state.type, term)}
|
||||
/>
|
||||
|
||||
<div className="content-wrapper">
|
||||
|
||||
Reference in New Issue
Block a user