(mvc) support "All" entries on grid filter

This commit is contained in:
Ad Schellevis 2015-05-28 14:19:59 +02:00
parent e62668db6c
commit 5d8b97e2b8

View File

@ -102,9 +102,10 @@ class UIModelGrid
}
// if result is relevant, count total and add (max number of) items to result.
// $itemsPerPage = -1 is used as wildcard for "all results"
if ($searchFound) {
if (count($result['rows']) < $itemsPerPage &&
$recordIndex >= ($itemsPerPage*($currentPage-1))
if ((count($result['rows']) < $itemsPerPage &&
$recordIndex >= ($itemsPerPage*($currentPage-1)) || $itemsPerPage == -1)
) {
$result['rows'][] = $row;
}