Browse files

BUG Use the manipulated datalist for counting total items.

This allows other Manipulators to change the total size of the List before
pagination is applied.
  • Loading branch information...
1 parent 4ead89a commit d2b4e0df01f82fdbe613890c8ae909af404640a5 @simonwelsh simonwelsh committed Sep 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/gridfield/GridFieldPaginator.php
View
2 forms/gridfield/GridFieldPaginator.php
@@ -108,7 +108,7 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat
public function getManipulatedData(GridField $gridField, SS_List $dataList) {
if(!$this->checkDataType($dataList)) return $dataList;
- $this->totalItems = $gridField->getList()->count();
+ $this->totalItems = $dataList->count();
$state = $gridField->State->GridFieldPaginator;
if(!is_int($state->currentPage)) {

0 comments on commit d2b4e0d

Please sign in to comment.