mirror of
https://github.com/Radarr/Radarr
synced 2025-12-23 16:56:36 +01:00
Fixed: History should reload on MovieDetail Movie Change
This commit is contained in:
parent
162980ccaf
commit
ee7e507cde
1 changed files with 14 additions and 0 deletions
|
|
@ -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() {
|
||||
this.props.clearMovieHistory();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue