We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to add a default sort to the view? I can't add it to the query as then it overrides the ability to sort by the other columns later.
The text was updated successfully, but these errors were encountered:
I don't know if this is correct, but I overwrote the defaults in the mount method;
public function mount() { $this->setTableProperties(); $this->sort_attribute = 'name'; $this->sort_direction = 'asc'; }
Sorry, something went wrong.
You can use default variables like below:
class UsersTable extends TableComponent { public $sortField = 'id'; public $sortDirection = 'desc'; }
What works for me is:
public string $defaultSortColumn = 'id'; public string $defaultSortDirection = 'desc';
No branches or pull requests
Is there a way to add a default sort to the view? I can't add it to the query as then it overrides the ability to sort by the other columns later.
The text was updated successfully, but these errors were encountered: