mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-13 10:32:21 +02:00
parent
bce848facf
commit
6de536a7ad
@ -217,6 +217,7 @@ class Queue extends Component {
|
|||||||
>
|
>
|
||||||
<TableOptionsModalWrapper
|
<TableOptionsModalWrapper
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
maxPageSize={200}
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
optionsComponent={QueueOptionsConnector}
|
optionsComponent={QueueOptionsConnector}
|
||||||
>
|
>
|
||||||
|
@ -49,11 +49,12 @@ class TableOptionsModal extends Component {
|
|||||||
|
|
||||||
onPageSizeChange = ({ value }) => {
|
onPageSizeChange = ({ value }) => {
|
||||||
let pageSizeError = null;
|
let pageSizeError = null;
|
||||||
|
const maxPageSize = this.props.maxPageSize ?? 250;
|
||||||
|
|
||||||
if (value < 5) {
|
if (value < 5) {
|
||||||
pageSizeError = translate('TablePageSizeMinimum', { minimumValue: '5' });
|
pageSizeError = translate('TablePageSizeMinimum', { minimumValue: '5' });
|
||||||
} else if (value > 250) {
|
} else if (value > maxPageSize) {
|
||||||
pageSizeError = translate('TablePageSizeMaximum', { maximumValue: '250' });
|
pageSizeError = translate('TablePageSizeMaximum', { maximumValue: `${maxPageSize}` });
|
||||||
} else {
|
} else {
|
||||||
this.props.onTableOptionChange({ pageSize: value });
|
this.props.onTableOptionChange({ pageSize: value });
|
||||||
}
|
}
|
||||||
@ -248,6 +249,7 @@ TableOptionsModal.propTypes = {
|
|||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
pageSize: PropTypes.number,
|
pageSize: PropTypes.number,
|
||||||
|
maxPageSize: PropTypes.number,
|
||||||
canModifyColumns: PropTypes.bool.isRequired,
|
canModifyColumns: PropTypes.bool.isRequired,
|
||||||
optionsComponent: PropTypes.elementType,
|
optionsComponent: PropTypes.elementType,
|
||||||
onTableOptionChange: PropTypes.func.isRequired,
|
onTableOptionChange: PropTypes.func.isRequired,
|
||||||
|
Loading…
Reference in New Issue
Block a user