1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-11 20:12:41 +02:00

Fixed: History should reload on MovieDetail Movie Change

This commit is contained in:
Qstick 2019-10-24 22:51:30 -04:00
parent 162980ccaf
commit ee7e507cde

View File

@ -35,6 +35,20 @@ class MovieHistoryTableContentConnector extends Component {
}); });
} }
componentDidUpdate(prevProps) {
const {
movieId
} = this.props;
// If the id has changed we need to clear the history
if (prevProps.movieId !== movieId) {
this.props.clearMovieHistory();
this.props.fetchMovieHistory({
movieId
});
}
}
componentWillUnmount() { componentWillUnmount() {
this.props.clearMovieHistory(); this.props.clearMovieHistory();
} }