- client: fix table pagination

This commit is contained in:
Artem Baskal
2019-11-26 20:50:02 +03:00
parent 4751528d69
commit f446186db1
3 changed files with 14 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactTable from 'react-table';
import { Trans, withNamespaces } from 'react-i18next';
import { SMALL_TABLE_DEFAULT_PAGE_SIZE } from '../../../helpers/constants';
class Leases extends Component {
cellWrap = ({ value }) => (
@@ -36,8 +37,9 @@ class Leases extends Component {
Cell: this.cellWrap,
},
]}
pageSize={100}
showPagination={true}
pageSize={SMALL_TABLE_DEFAULT_PAGE_SIZE}
showPageSizeOptions={false}
showPagination={leases.length > SMALL_TABLE_DEFAULT_PAGE_SIZE}
noDataText={t('dhcp_leases_not_found')}
minRows={6}
className="-striped -highlight card-table-overflow"