Why attribute a didn't show in page 2 and so on datatable?


I has make datatable with laravel in simple mode like this

    $i = 1;
  @foreach ($data_transaction as $item)
    $encrypt = Crypt::encrypt($item->id);
    <td>Rp {{number_format($item->details->sum('amount'))}}</td>
      <a href="{{url('read-transaction-' . $encrypt)}}"><i data-feather="eye"></i></a>

in page one, everything looks ok.

But afther that, in page 2 and so on the view icon is disappear

my datatables initialization just like this

$(document).ready(function() {

Am I did something wrong?

>Solution :

I had the same issue and I added the callback function in datatable and the issue was resolved. Kindly check the below Answer.

$('.datatables').dataTable( {
    "drawCallback": function( settings ) {
} );

Hope this will help you.

Leave a ReplyCancel reply