У меня проблема с jquery dataTable.
Я хотел бы, чтобы dataTable с scrollY только на теле, я хотел бы, чтобы заголовок всегда был виден ... но scrollY на всех dataTable (tbody + thead):
$('#table_toto').DataTable({
autoWidth: false,
columns: [
{
data: 'toto1',
width: '40%',
default: '-'
},
{
data: 'toto2',
width: '30%',
default: '-'
},
{
data: 'toto3',
width: '30%',
default: '-'
},
],
fixedHeader: true,
paging: false,
info: false,
scrollCollapse: true,
scrollY: '100%',
drawCallback: function(settings) {
...
},
"createdRow": function (row, data) {
...
}
});
DOM:
<div id="table_toto_wrapper" class="table-wrapper">
<table id="table_toto" class="display table table-striped table-hover">
<thead>
<tr>
<th><span lang="aa">"toto1"</span></th>
<th><span lang="aa">"toto2</span></th>
<th><span lang="aa">"toto3"</span>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
С этим кодом scrollY находится не только в теле: - /
Не могли бы вы мне помочь?
Спасибо