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.
This commit is contained in:
Simon Welsh 2012-09-06 23:43:34 +12:00
parent 4ead89a4d0
commit d2b4e0df01

View File

@ -108,7 +108,7 @@ class GridFieldPaginator implements GridField_HTMLProvider, GridField_DataManipu
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)) {