Save the last state of the paging table
Save the last state of the paging table
Hello everyone,
I'm new to web programming and during my research at Google found this wonderful data table.
I'm using a DataTable with pagination, then I came across the following problem. After doing a refresh on the page pagination of the table does not return to the previous paging, always returning to the original pagination.
I'm using bstateSave parameter to true.
Below is the code I am using for my table. At the moment this is the only thing that prevents me from using Datatable fully. Sorry for my English because I am Brazilian and not dominate the language.
<script type="text/javascript">
//script para iniciar a tabela de dados das tarefas.
$(document).ready(function() {
$('#tabTarefa').dataTable( {
"iCookieDuration": 60*60*24, // 1 day
"bstateSave": true,
"bSort": true, // Disable sorting
"aaSorting": [[0,"desc"]], //ordena os dados em forma descrescente
"iDisplayLength": 12, // records per page
"sDom": "<'row'<'col-md-12 text-right'f>><t><'row'<'col-md-12 text-center'p>>",
"sPaginationType": "bootstrap"
});
$(".tooltips a").tooltip({
placement : 'bottom'
});
$(".submitOficina").tooltip({
placement : 'bottom'
});
});
</script>