laravel-livewire-tables
laravel-livewire-tables copied to clipboard
[Bug]: Default sort pills are visible
What happened?
In older versions, default sorting would not show the sorting pills. This felt like natural behaviour as this sorting is not decided by the user and therefore they should not need to clear it. It is the default sort by definition.
To get around this, you now have to do something like this, which is a bit messy:
public function builder(): Builder
{
return Model::query()
->when(! $this->sorts, fn($query) => $query->orderBy('order_column'));
}
Is there a better way?
How to reproduce the bug
No response
Package Version
3.6.0
PHP Version
None
Laravel Version
No response
Alpine Version
No response
Theme
None
Notes
No response
Error Message
No response