I'm using jQuery DataTables in a console app.
The following code adds a row to the DataTable:
$('#datatable-table').dataTable().fnAddData([
'<h1>test</h1>',
'test',
'test',
'test',
'test',
'test',
'test',
'test',
'test',
'test',
'test'
]);
The problem is, when you programmatically add a row, it resets the user's pagination and filtering. So if a user is on page 3, when I update the table, he will go back to page 1. Which doesn't really work for me considering I'm constantly needing to add/remove/update rows.
Any suggestions?