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')); } }