I'm strugling with fancyTable pagination. The table renders all rows in two pages but the first click in my page 2 or 3 the table gets hidden and when I click again in that page the table appears with the data. What's my problem? I'm using this fancyTable in my laravel project, and I render the results in a for each I0m not using a js function to render the fancyTable. Anyone with the same problem?
table style="margin-top: 20px;" id="tabelaAssistencia">
<thead>
<tr>
<th scope="column" style="text-align:center">Entidade</th>
<th scope="column" style="text-align:center" data-sortas="numeric">Numero</th>
</tr>
</thead>
<tbody>
@if (count($results) > 0) @foreach ($results as $r)
<tr>
<td class="active-apply"></td>
@endif
<td class="active-apply"></td>
@endforeach @endif
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function(){
$("#tabelaAssistencia").fancyTable({
sortColumn:1,// column number for initial sorting
sortOrder:'asc',// 'desc', 'descending', 'asc', 'ascending', -1 (descending) and 1 (ascending)
sortable:true,
pagination:true,// default: false
searchable:true,
// globalSearch:true,
// globalSearchExcludeColumns: [2,5],// exclude column 2 & 5,
paginationClass:"btn btn-light",
paginationClassActive:"btn-active",
perPage: 15,
inputStyle:"color:black!important;font-size:14px",
inputPlaceholder:"Introduza o que pretende procurar..."
});
});
</script>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire