I have a problem with duplicated pagination & search bar on jquery datatables, can someone help me out?

Viewed 21

result here

$(document).ready(function() {
   $('#acc').DataTable( {
      "lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ],
      responsive: {
         details: {
            display: $.fn.dataTable.Responsive.display.modal( {
               header: function ( row ) {
                  var data = row.data();
                  return 'Details for '+data[0];
               }
            } ),
            renderer: $.fn.dataTable.Responsive.renderer.tableAll( {
               tableClass: 'table'
            } )
         }
      }
   } );
} );
<div class="container">
   <table id="acc" class="table table-striped responsive nowrap table-hover" style="width:100%">
      <thead>
         <tr>
            <th>ID</th>
            <th>Name</th>
            <th>Email</th>
            <th>Password</th>
            <th>Role</th>
         </tr>
      </thead>
      <tbody>
         <tr>
            <td>1</td>
            <td>Josh</td>
            <td>josh@test.com</td>
            <td>josh123</td>
            <td>Leader</td>
         </tr>
      </tbody>
   </table>
</div>

I don't know why this happens because it's never happened before, I use vue.js 3 and it happened when I opened the table page but when I refreshed the page it went back to normal, and when I go to the other page and come back to the table page the table become error again.

0 Answers
Related