update
This commit is contained in:
@@ -11,15 +11,29 @@ class DataTable extends Component
|
||||
public string $id;
|
||||
public string $ajax;
|
||||
public array $columns;
|
||||
public ?string $bulkDeleteUrl;
|
||||
|
||||
public function __construct(
|
||||
string $id,
|
||||
string $ajax,
|
||||
array $columns
|
||||
array $columns,
|
||||
?string $bulkDeleteUrl = null
|
||||
) {
|
||||
$this->id = $id;
|
||||
$this->ajax = $ajax;
|
||||
$this->columns = $columns;
|
||||
$this->bulkDeleteUrl = $bulkDeleteUrl;
|
||||
|
||||
if ($this->bulkDeleteUrl) {
|
||||
array_unshift($this->columns, [
|
||||
'key' => 'checkbox',
|
||||
'label' => '<div class="form-check d-flex align-items-center justify-content-center"><input class="form-check-input" type="checkbox" id="dt-master-checkbox"></div>',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
'className' => 'text-center align-middle',
|
||||
'width' => '30px'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user