Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

I has make datatable with laravel in simple mode like this

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

in page one, everything looks ok.

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

enter image description here

my datatables initialization just like this

$(document).ready(function() {
  $('.datatables').DataTable();
  feather.replace()
})

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 ) {
        feather.replace();
    }
} );

Hope this will help you.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading