When I add the code
"dom" => 'Bfrtip', "buttons" => [
"copy", "csv", "excel", "pdf", "print", "colvis"
],
the Show selector to select the number of entries to show per page disappears.
Below is the my view code for a DataTable
DataTables::create(array(
"name" => "hoursworked",
"dataSource" => $this->dataStore('data'),
"columns"=>array(
'username' => array('label' => 'User Name',),
'project_id' => array('label' => 'Project Id',),
'activity_id' => array('label' => 'Activity Id',),
'task_id' => array('label' => 'Task Id',),
'deliverable_id' => array('label' => 'Deliverable Id',),
'working_date' => array('label' => 'Working Date',),
'hours' => array('label' => 'Hours', "footer" => "sum"),
'hours_overtime' => array('label' => 'Hours Overtime', "footer" => "sum"),
'bank_regular_hours' => array('label' => 'Bank Regular Hours', "footer" => "sum"),
'bank_overtime_hours' => array('label' => 'Bank Overtime Hours', "footer" => "sum"),
'validation' => array('label' => 'Validation',),
),
"clientRowGroup" => [
"username" => [
'direction' => 'asc',
'calculate' => [
'hours' => ['sum', 'hours'],
'hoursOvertime' => ['sum', 'hours_overtime'],
'bankRegularHours' => ['sum', 'bank_regular_hours'],
'bankOvertimeHours' => ['sum', 'bank_overtime_hours'],
],
"top" => "<td colspan='11' style = 'background-color: DodgerBlue'; style = 'color: black'>{username}</td>",
"bottom" => "<td>{username}</td><td></td><td></td><td></td><td></td><td></td><td>{hours}</td>
<td>{hoursOvertime}</td><td>{bankRegularHours}</td><td>{bankOvertimeHours}
</td><td><div style='page-break-before:always;'></div></td>",
],
],
"plugins" => ["Buttons", "FixedColumns", "FixedHeader", "KeyTable", "Responsive", "RowReorder", "Scroller",
"SearchPanes"],
"options" => [
"colReorder"=>true,
"searching" => true,
"paging" => true,
"pageLength" => 25,
"dom" => 'Bfrtip',
"buttons" => [
"copy", "csv", "excel", "pdf", "print", "colvis"
],
],
//"themeBase"=>"bs4",
//"searchOnEnter" => true,
//"searchMode" => "or"
));
`
Is this a bug, or am I doing something wrong. Any help in getting this to work would be greatly appreiated.
Thank you
Lloyd