From e1e8669beb710aa5a4f61753bc25fe6b11ef010a Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 12 Dec 2024 01:32:01 +0100 Subject: [PATCH] Fix tests --- app/Form/Actions/UpdateParticipantSearchIndexAction.php | 2 +- app/Form/Models/Form.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Form/Actions/UpdateParticipantSearchIndexAction.php b/app/Form/Actions/UpdateParticipantSearchIndexAction.php index ceba60e3..450af0ea 100644 --- a/app/Form/Actions/UpdateParticipantSearchIndexAction.php +++ b/app/Form/Actions/UpdateParticipantSearchIndexAction.php @@ -20,7 +20,7 @@ class UpdateParticipantSearchIndexAction [ 'filterableAttributes' => [...$form->getFields()->filterables()->getKeys(), 'parent-id'], 'searchableAttributes' => $form->getFields()->searchables()->getKeys(), - 'sortableAttributes' => $form->getFields()->sortables()->getKeys(), + 'sortableAttributes' => [...$form->getFields()->sortables()->getKeys(), 'id'], 'displayedAttributes' => [...$form->getFields()->filterables()->getKeys(), ...$form->getFields()->searchables()->getKeys(), 'id'], 'pagination' => [ 'maxTotalHits' => 1000000, diff --git a/app/Form/Models/Form.php b/app/Form/Models/Form.php index b7c6cdab..dd6741f2 100644 --- a/app/Form/Models/Form.php +++ b/app/Form/Models/Form.php @@ -186,6 +186,6 @@ class Form extends Model implements HasMedia public function defaultSorting(): Sorting { - return Sorting::by(data_get($this->meta, 'active_columns.0')); + return Sorting::by(data_get($this->meta, 'active_columns.0', 'id')); } }