Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/table-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,37 @@ $(document).on('dtrow:mouseenter', (event, row, data, table) => {
$(document).on('dtrow:mouseleave', (event, row, data, table) => {
//do something
});

### Buttons
You can specify Table based buttons for available options view Datatables https://datatables.net/reference/button/
Note: you must use php array not JSON for example
```
/**
* define the Table buttons array
*
* @return array
*/
public function buttons(): array
{
return [
[
'extend' => 'print',
'text' => 'Print',
'exportOptions' => [
'columns' => [0, ':visible'],
],
],
[
'extend' => 'csv',
'text' => 'Excel',
'exportOptions' => [
'columns' => [0, ':visible'],
],
],
'copy',
[
'extend' => 'colvis',
'className' => 'btn btn-info'
]
];
}