From e8ec536a5a2d91d34d1bb5a6585b0573246ba555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 23 Apr 2023 23:38:59 +0200 Subject: [PATCH] Allow to order by storelocation column Related to discussion #269 --- src/DataTables/PartsDataTable.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DataTables/PartsDataTable.php b/src/DataTables/PartsDataTable.php index 886d9fe2..9e6e2415 100644 --- a/src/DataTables/PartsDataTable.php +++ b/src/DataTables/PartsDataTable.php @@ -152,6 +152,7 @@ final class PartsDataTable implements DataTableTypeInterface if ($this->security->isGranted('@storelocations.read')) { $dataTable->add('storelocation', TextColumn::class, [ 'label' => $this->translator->trans('part.table.storeLocations'), + 'orderField' => 'storelocations.name', 'render' => function ($value, Part $context) { $tmp = []; foreach ($context->getPartLots() as $lot) {