mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-25 22:46:31 -04:00
Don't rerender all cells each scroll
This commit is contained in:
@@ -12,7 +12,6 @@ import SpinnerIconButton from 'Components/Link/SpinnerIconButton';
|
||||
import ProgressBar from 'Components/ProgressBar';
|
||||
import TagListConnector from 'Components/TagListConnector';
|
||||
import CheckInput from 'Components/Form/CheckInput';
|
||||
import VirtualTableRow from 'Components/Table/VirtualTableRow';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||
import SeriesTitleLink from 'Series/SeriesTitleLink';
|
||||
@@ -79,7 +78,6 @@ class SeriesIndexRow extends Component {
|
||||
|
||||
render() {
|
||||
const {
|
||||
style,
|
||||
id,
|
||||
monitored,
|
||||
status,
|
||||
@@ -126,7 +124,7 @@ class SeriesIndexRow extends Component {
|
||||
} = this.state;
|
||||
|
||||
return (
|
||||
<VirtualTableRow style={style}>
|
||||
<>
|
||||
{
|
||||
columns.map((column) => {
|
||||
const {
|
||||
@@ -494,13 +492,12 @@ class SeriesIndexRow extends Component {
|
||||
seriesId={id}
|
||||
onModalClose={this.onDeleteSeriesModalClose}
|
||||
/>
|
||||
</VirtualTableRow>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
SeriesIndexRow.propTypes = {
|
||||
style: PropTypes.object.isRequired,
|
||||
id: PropTypes.number.isRequired,
|
||||
monitored: PropTypes.bool.isRequired,
|
||||
status: PropTypes.string.isRequired,
|
||||
|
||||
@@ -3,6 +3,7 @@ import React, { Component } from 'react';
|
||||
import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter';
|
||||
import { sortDirections } from 'Helpers/Props';
|
||||
import VirtualTable from 'Components/Table/VirtualTable';
|
||||
import VirtualTableRow from 'Components/Table/VirtualTableRow';
|
||||
import SeriesIndexItemConnector from 'Series/Index/SeriesIndexItemConnector';
|
||||
import SeriesIndexHeaderConnector from './SeriesIndexHeaderConnector';
|
||||
import SeriesIndexRow from './SeriesIndexRow';
|
||||
@@ -50,16 +51,20 @@ class SeriesIndexTable extends Component {
|
||||
const series = items[rowIndex];
|
||||
|
||||
return (
|
||||
<SeriesIndexItemConnector
|
||||
<VirtualTableRow
|
||||
key={key}
|
||||
component={SeriesIndexRow}
|
||||
style={style}
|
||||
columns={columns}
|
||||
seriesId={series.id}
|
||||
languageProfileId={series.languageProfileId}
|
||||
qualityProfileId={series.qualityProfileId}
|
||||
showBanners={showBanners}
|
||||
/>
|
||||
>
|
||||
<SeriesIndexItemConnector
|
||||
key={series.id}
|
||||
component={SeriesIndexRow}
|
||||
columns={columns}
|
||||
seriesId={series.id}
|
||||
languageProfileId={series.languageProfileId}
|
||||
qualityProfileId={series.qualityProfileId}
|
||||
showBanners={showBanners}
|
||||
/>
|
||||
</VirtualTableRow>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -108,6 +113,7 @@ class SeriesIndexTable extends Component {
|
||||
sortDirection={sortDirection}
|
||||
onRender={onRender}
|
||||
onScroll={onScroll}
|
||||
isScrollingOptOut={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user