From 94279ca753f7e073e75b944567a22baa9691d39d Mon Sep 17 00:00:00 2001 From: Pavel Janda Date: Sun, 24 Nov 2019 14:21:07 +0100 Subject: [PATCH] Fixed paginator when using translated 'all' option, closes #833 --- src/DataGrid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataGrid.php b/src/DataGrid.php index ac72bbe9..ab3b69d2 100644 --- a/src/DataGrid.php +++ b/src/DataGrid.php @@ -2784,7 +2784,7 @@ public function getPerPage() $per_page = $this->per_page ?: reset($items_per_page_list); if (($per_page !== 'all' && !in_array((int) $this->per_page, $items_per_page_list, true)) - || ($per_page === 'all' && !in_array($this->per_page, $items_per_page_list, true))) { + || ($per_page === 'all' && !array_key_exists($this->per_page, $items_per_page_list, true))) { $per_page = reset($items_per_page_list); }