When total page number of records on a page in pagination is less than the page size than it should only show 1 page in pagination.
Actual Behavior
When the total number of records on a page is less than the page size then the total pages in pagination are equal to the total number of records which is wrong. As a workaround I now always have to set the page size to 2 by default
Steps to reproduce
let pageSize = 2; //there seems to be a bug in griddle if page size is less than 2 then it shows the total pages equal to total number of records
if(this.props.pagination.total_pages > pageSize ) {
pageSize = this.props.pagination.total_pages;
}
pageProperties={{
currentPage: this.props.pagination.current_page,
pageSize: pageSize,
recordCount: this.props.pagination.total
}}
Griddle version
1.9.0
Expected Behavior
When total page number of records on a page in pagination is less than the page size than it should only show 1 page in pagination.
Actual Behavior
When the total number of records on a page is less than the page size then the total pages in pagination are equal to the total number of records which is wrong. As a workaround I now always have to set the page size to 2 by default
Steps to reproduce