From 720ed5335c1d5c8621630237470daefc32f4a338 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 15 Mar 2021 11:19:48 +0300 Subject: [PATCH] Fixed #1870 - Datatable rows per page doesn't work --- src/components/datatable/DataTable.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/datatable/DataTable.js b/src/components/datatable/DataTable.js index 57125b54be..4959557266 100644 --- a/src/components/datatable/DataTable.js +++ b/src/components/datatable/DataTable.js @@ -225,7 +225,9 @@ export class DataTable extends Component { constructor(props) { super(props); - this.state = {}; + this.state = { + d_rows: props.rows + }; if (!this.props.onPage) { this.state.first = props.first; @@ -530,7 +532,6 @@ export class DataTable extends Component { createPaginator(position, totalRecords, data) { const className = classNames('p-paginator-' + position, this.props.paginatorClassName); - return (