Заголовки столбцов DataTable отображается не корректно, подскажите пожалуйста
Заголовки столбцов смещены
Описание таблицы такого
$('#buh_history_table').DataTable({
pageLength: 99999999,
deferRender: true,
scrollY: 350,
scrollCollapse: true,
scroller: true,
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf',
{
extend: 'print',
text: 'Печать',
}
],
language: {
url: "js/Russian.lang"
},
"order": [
[4, 'desc']
]
} );
Но! Как только стоит сделать ручную сортировку кликнув по заголовку столбца, Всё становится нормально
Скрины прилагаю
P.S. Если я правильно понимаю, можно искусственно вызвать перерисовку после прогруза страницы
P.S.2. Именно такая проблема происходит только в Modal bootstrap 4, без модала всё нормально
текст модала прилагаю ниже
<button class="btn btn-primary" data-toggle="modal" data-target="#buh_history">Баланс наличных <?php echo $full_balance?>₽</button>
<div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="buh_history" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Баланс наличных <?php echo $full_balance?> ₽</h4>
</div>
<div class="modal-body">
<div class="form-group" id="fooBtnGroup">
<form method="post" id="insert_form_dp">
<label class="control-label">Добавить наличные в кассу:</label>
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-success" id="b_add_sum">Приход</button>
</div>
<input type="text" name="add_sum" id="add_sum" class="form-control" value="" placeholder="Укажите сумму"/>
<div class="input-group-btn">
<button type="button" class="btn btn-warning" id="b_deduct_sum" >Расход</button>
</div>
</div>
<input name="add_sum_who" id="add_sum_who" autocomplete=off class="form-control" placeholder='Комментарий к внесению/выдаче средств
Например:"Получена благодарность от Иванова" или "Выдано Петрову на личные нужды в счёт З/П"'/></input>
</form>
</div>
<?php if ($not_operations){?>
<label class="control-label m-t-20" for="example-input1-group3">История работы с наличными:</label>
<from class="form-horizontal form-material" >
<div class="form-group">
<div class="table-responsive">
<table id="buh_history_table" class="table table-responsive table-striped">
<thead>
<tr>
<th>Приход</th>
<th>Расход</th>
<th>Комментарий</th>
<th>Остаток</th>
<th class="text-nowrap">Дата Время</th>
</tr>
</thead>
<tbody>
<?php /*код со строками таблицы*/ ?>
</tbody>
</table>
</div>
</div>
</from>
</div>
<?php } else {echo' <label class="text-muted">История работы с наличными пуста.</label>';echo "$not_operations";}?>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Закрыть</button>
</div>
</div>
</div>
</div>