mirror of https://github.com/lidarr/Lidarr
Recalculate grid in overview view when changing options
(cherry picked from commit d105dd47e02b9ed3616edf31d77623ca2ceb791e) Closes #1656
This commit is contained in:
parent
f47e5084e8
commit
fcd9fb592d
|
@ -15,7 +15,6 @@ const rows = [
|
||||||
name: 'monitored',
|
name: 'monitored',
|
||||||
showProp: 'showMonitored',
|
showProp: 'showMonitored',
|
||||||
valueProp: 'monitored'
|
valueProp: 'monitored'
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'qualityProfileId',
|
name: 'qualityProfileId',
|
||||||
|
|
|
@ -73,7 +73,8 @@ class ArtistIndexOverviews extends Component {
|
||||||
sortKey,
|
sortKey,
|
||||||
overviewOptions,
|
overviewOptions,
|
||||||
jumpToCharacter,
|
jumpToCharacter,
|
||||||
scrollTop
|
scrollTop,
|
||||||
|
isSmallScreen
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -84,13 +85,17 @@ class ArtistIndexOverviews 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
|
||||||
|
)
|
||||||
|
) {
|
||||||
// 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…
Reference in New Issue