I have a problem in the DataTables, when I put in the option : "dom" => 'Bfrtip' The result is the text "Show X entries" disapears.
If I remove the option, the text "Show X entries" is shown and I can select 10, 25... in the list.
Do you know how to have the buttons and the text "Show X entries" ?
My code is :
DataTables::create(array(
"dataSource"=>$this->dataStore("indicatorTable"),
"colorScheme"=>"more",
"plugins"=>array("Buttons", "FixedColumns", "FixedHeader", "KeyTable", "Responsive", "RowReorder", "Scroller", "SearchPanes"),
"columns"=>array(
"code"=>array(
"label"=>"Code",
"type"=>"string",
),
"description"=>array(
"label"=>"Description",
"type"=>"string",
'data-order' => 'description', //order this column by description
'data-search' => 'code', //search this column by description
),
),
"options" => array(
"dom" => 'Bfrtip',
"buttons" => [
array(
'extend'=>'excel',
'text'=>'<i class="fas fa-file-excel"></i> Excel',
'titleAttr'=>'Excel',
'className'=>'btn btn-sm btn-primary ml-2'
),
array(
'extend'=>'print',
'text'=>'<i class="fas fa-print"></i> Print',
'titleAttr'=>'Print',
'className'=>'btn btn-sm btn-primary ml-2'
),
array(
'extend'=>'pdf',
'text'=>'<i class="fas fa-file-pdf"></i> PDF',
'titleAttr'=>'PDF',
'className'=>'btn btn-sm btn-primary ml-2'
),
//"colvis"
],
"paging"=>true,
"pageLength" => 10,
"showFooter"=>true,
"stateSave" => true,
"themeBase"=>"bs4",
"searching"=>true,
"fixedHeader"=>true,
"select"=>true,
),
"searchMode" => "and",
"cssClass"=>array(
"table"=>"table table-centered mb-0 table-hover table-sm",
'th' => 'reportHeader',
'tr' => 'reportRow',
'td' => function($row, $colName) {
$s = is_numeric('1') ? '' : 'reportLabel';
return $s;
},
'tf' => 'reportFooter',
'button' => 'btn btn-primary'
),
));