Skip to content

Commit

Permalink
Get size of the table from table prosp (#6880)
Browse files Browse the repository at this point in the history
Co-authored-by: Petrica Nanca <petrica.nanca@metasfresh.com>
  • Loading branch information
petrican and Petrica Nanca committed Jun 18, 2020
1 parent 20cc8d5 commit 2cbfec6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/containers/DocumentList.js
Expand Up @@ -579,14 +579,12 @@ class DocumentListContainer extends Component {
* @summary ToDo: Describe the method.
*/
handleChangePage = (index) => {
const { reduxData } = this.props;
const { table, reduxData } = this.props;
let currentPage = reduxData.page;

switch (index) {
case 'up':
currentPage * reduxData.pageLength < reduxData.size
? currentPage++
: null;
currentPage * reduxData.pageLength < table.size ? currentPage++ : null;
break;
case 'down':
currentPage !== 1 ? currentPage-- : null;
Expand Down

0 comments on commit 2cbfec6

Please sign in to comment.