Skip to content

Commit

Permalink
Fixed paginator when using translated 'all' option, closes #833
Browse files Browse the repository at this point in the history
  • Loading branch information
paveljanda committed Nov 24, 2019
1 parent 8601759 commit b10df40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataGrid.php
Expand Up @@ -2783,8 +2783,8 @@ 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))) {
if (($per_page !== 'all' && !array_key_exists((int) $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);
}

Expand Down

0 comments on commit b10df40

Please sign in to comment.