Skip to content

Commit

Permalink
Fix for pager render -> first we need to ensure that we have models f…
Browse files Browse the repository at this point in the history
…rom DataProvider by calling `DataProvider->getTotalCount()` | `DataProvider->getCount()`
  • Loading branch information
microThread committed Jan 10, 2018
1 parent 518af87 commit 10da554
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/renderer/GridViewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public function renderSection($name)
public function renderPager()
{
$pagination = $this->grid->dataProvider->getPagination();
$totalResults = 0;
$resultsPerPage = 0;
$totalResults = $this->grid->dataProvider->getTotalCount();
$resultsPerPage = $this->grid->dataProvider->getCount();
$totalPages = 1;
$currentPage = 1;

Expand All @@ -100,10 +100,6 @@ public function renderPager()
$totalPages = $pagination->getPageCount();
$currentPage = $pagination->getPage() + 1;

} else
{
$totalResults = $this->grid->dataProvider->getTotalCount();
$resultsPerPage = $this->grid->dataProvider->getCount();
}

return [
Expand Down

0 comments on commit 10da554

Please sign in to comment.