app/Http/Livewire/Datatable.php: Adding $default_sort variable
This commit is contained in:
parent
9bc409f203
commit
a88e21fb19
1 changed files with 7 additions and 1 deletions
|
|
@ -36,6 +36,11 @@ class Datatable extends Component
|
|||
*/
|
||||
public array $sort_columns;
|
||||
|
||||
/**
|
||||
* Default sorting column
|
||||
*/
|
||||
public string $default_sort;
|
||||
|
||||
public $route_create;
|
||||
|
||||
/**
|
||||
|
|
@ -57,7 +62,8 @@ class Datatable extends Component
|
|||
$default_sort = '', $route_create = null, $route_delete = null, $route_edit = null)
|
||||
{
|
||||
$this->model = app()->make($model);
|
||||
$this->sort = $default_sort;
|
||||
$this->default_sort = $default_sort;
|
||||
$this->sort = $this->default_sort;
|
||||
$this->sort_columns = $sort_columns;
|
||||
$this->route_create = $route_create;
|
||||
$this->route_edit = $route_edit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue