Disable Default Sort while Searching with Scout
I use Laravel Scout with Meilisearch for table search. I want to sort the table based on Meilisearch's rank but
defaultSort()
overrides the Meilisearch's rank. How to disable the defaultSort()
while on search?
2 Replies
up
still not find the answer
We have the same issue.
I just created a PR to disable sorting with a closure when a table search is active: https://github.com/filamentphp/filament/pull/13540
GitHub
Add option to pass a closure as the sortable condition by gehrisand...
Description
This PR adds the ability to pass a closure as the sortable condition:
TextColumn::make('date')
->sortable(fn() => $this->hasTableSearch()),
Functional changes
Cod...