Fixed: Rerender Overviews on Overview option changes

Fixes #5150

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
new-exclusion-lists
Qstick 4 years ago
parent 6d452d8479
commit 37c9701237

@ -72,7 +72,8 @@ class MovieIndexOverviews extends Component {
sortKey, sortKey,
overviewOptions, overviewOptions,
jumpToCharacter, jumpToCharacter,
isMovieEditorActive isMovieEditorActive,
isSmallScreen
} = this.props; } = this.props;
const { const {
@ -82,13 +83,15 @@ class MovieIndexOverviews extends Component {
if (prevProps.sortKey !== sortKey || if (prevProps.sortKey !== sortKey ||
prevProps.overviewOptions !== overviewOptions) { prevProps.overviewOptions !== overviewOptions) {
this.calculateGrid(); this.calculateGrid(this.state.width, isSmallScreen);
} }
if (this._grid && if (
this._grid &&
(prevState.width !== width || (prevState.width !== width ||
prevState.rowHeight !== rowHeight || prevState.rowHeight !== rowHeight ||
hasDifferentItemsOrOrder(prevProps.items, items) || hasDifferentItemsOrOrder(prevProps.items, items) ||
prevProps.overviewOptions !== overviewOptions ||
prevProps.isMovieEditorActive !== isMovieEditorActive)) { prevProps.isMovieEditorActive !== isMovieEditorActive)) {
// recomputeGridSize also forces Grid to discard its cache of rendered cells // recomputeGridSize also forces Grid to discard its cache of rendered cells
this._grid.recomputeGridSize(); this._grid.recomputeGridSize();

Loading…
Cancel
Save