Reciban mi cordial saludo, estoy realizando un proyecto con datatable, mi tabla trae los registros de mi base de datsMysql (+3000 registros). El sistema funciona bien pero el inconveniente que presento es el siguiente:
Al iniciar sesión todos registros aparecen esto dura 4 segundos luego,
vuelve a su estado de tabla, cual seria el inconveniente ?
Aquí les dejo mi código, espero puedan ayudarme a resolver este inconveniente
<body>
<div class="col-sm-12">
<div class="row">
<div class="table-responsive">
<table id="tablaPersonas" class="table display table-striped table-bordered" style="width:100%">
<thead class="text-center">
<tr>
<th>ID</th>
<th>NIVEL</th>
<th>PROY</th>
<th>RD</th>
<th>FECHA</th>
<th>OFICINA</th>
<th>TIPO</th>
<th>DNI</th>
<th>APELLIDOS</th>
<th>NOMBRES</th>
<th>DOMICILIO</th>
<th>M-DEV.</th>
<th>M-INT.</th>
<th>FECHA RECEP.</th>
<th>RECEPCIONADO</th>
<th>ACCIONES</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $dat) {
?>
<tr>
<td><?php echo $dat['id'] ?></td>
<td><?php echo $dat['nivel'] ?></td>
<td><?php echo $dat['nproyecto'] ?></td>
<td><?php echo $dat['nrd'] ?></td>
<td><?php echo $dat['fecha'] ?></td>
<td><?php echo $dat['oficina'] ?></td>
<td><?php echo $dat['tipo'] ?></td>
<td><?php echo $dat['dni'] ?></td>
<td><?php echo $dat['apellidos'] ?></td>
<td><?php echo $dat['nombres'] ?></td>
<td><?php echo $dat['domicilio'] ?></td>
<td><?php echo $dat['devengado'] ?></td>
<td><?php echo $dat['interes'] ?></td>
<td><?php echo $dat['frecep'] ?></td>
<td><?php echo $dat['recep'] ?></td>
<td></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</body>
Aqui una muestra de mi codigo, que trae los datos, como menciona el primer comentario
$(document).ready(function(){
tablaPersonas = $("#tablaPersonas").DataTable({
"columnDefs":[{
"targets": -1,
"data":null,
"defaultContent": "<div class='text-center'><div class='btn-group'><button class='btn btn-primary btnEditar'>Editar</button><button class='btn btn-danger btnBorrar'>Borrar</button></div></div>"
}],
});