How to reload table when using localStorage as data source?
How to reload table when using localStorage as data source?
mspdev
Posts: 1Questions: 1Answers: 0
I am populating my DataTable from HTML5 local storage. The initial load works great, but how do I reload the table after I have made updates to the local storage? I would like to manually trigger the reload, like I was able to do using "ajax.reload()" when using server side processing.
Here's my DataTable initialization:
$('#pubTable').dataTable({
'processing': false,
'data': JSON.parse(localStorage.getItem('publications')),
'columns': [
{ 'data': 'rank', 'class': 'text-center' },
{ 'data': 'publicationNumber' },
{ 'data': 'publicationDate' }
],
});
This discussion has been closed.