Skip to content

Commit 10da554

Browse files
committed
Fix for pager render -> first we need to ensure that we have models from DataProvider by calling DataProvider->getTotalCount() | DataProvider->getCount()
1 parent 518af87 commit 10da554

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/renderer/GridViewRenderer.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function renderSection($name)
8888
public function renderPager()
8989
{
9090
$pagination = $this->grid->dataProvider->getPagination();
91-
$totalResults = 0;
92-
$resultsPerPage = 0;
91+
$totalResults = $this->grid->dataProvider->getTotalCount();
92+
$resultsPerPage = $this->grid->dataProvider->getCount();
9393
$totalPages = 1;
9494
$currentPage = 1;
9595

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

103-
} else
104-
{
105-
$totalResults = $this->grid->dataProvider->getTotalCount();
106-
$resultsPerPage = $this->grid->dataProvider->getCount();
107103
}
108104

109105
return [

0 commit comments

Comments
 (0)