Skip to content

Commit 94ebc30

Browse files
committed
Disable sorting by direct URL
1 parent ded16b0 commit 94ebc30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/BaseListView.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ private function prepareDataReaderByParams(
347347
): ReadableDataInterface {
348348
$dataReader = $this->getDataReader();
349349

350+
if ($dataReader instanceof LimitableDataInterface && $dataReader->getLimit() !== null) {
351+
// Disable sorting for data reader with pre-defined limit.
352+
$sort = null;
353+
}
354+
350355
if (!$dataReader instanceof PaginatorInterface) {
351356
if (
352357
$dataReader instanceof OffsetableDataInterface

0 commit comments

Comments
 (0)