Logo Beartropy Tables

Beartropy Tables

Sorting
Configure default sorting behavior.

Default Sorting

You can configure the initial sorting state in your component's setup (e.g., in mount or configure).

setSortColumn(string $column): Set the default column to sort by.
setSortDirectionAsc(bool $bool): Set direction to Ascending.
setSortDirectionDesc(bool $bool): Set direction to Descending.

1public function configure(): void
2{
3 $this->setSortColumn('name');
4 $this->setSortDirectionDesc(true);
5}