Skip to content

Commit dfad912

Browse files
Ensure custom limit takes precedence the view-mode's default limit
1 parent 909a277 commit dfad912

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Compat/CompatController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function createLimitControl(): LimitControl
268268
function (ViewModeSwitcher $viewModeSwitcher) use ($limitControl) {
269269
if (! isset($this->getServerRequest()->getQueryParams()[$limitControl->getLimitParam()])) {
270270
$limit = $viewModeSwitcher->getViewMode()->getPageSize();
271-
$limitControl->setDefaultLimit($limit);
271+
$limitControl->setDefaultLimit($this->getPageSize($limit));
272272
}
273273
}
274274
);
@@ -307,7 +307,7 @@ public function createPaginationControl(Paginatable $paginatable): PaginationCon
307307
function (ViewModeSwitcher $viewModeSwitcher) use ($paginationControl) {
308308
if (! isset($this->getServerRequest()->getQueryParams()[$paginationControl->getPageSizeParam()])) {
309309
$limit = $viewModeSwitcher->getViewMode()->getPageSize();
310-
$paginationControl->setDefaultPageSize($limit)
310+
$paginationControl->setDefaultPageSize($this->getPageSize($limit))
311311
->apply();
312312
}
313313
}

0 commit comments

Comments
 (0)