Datatable reload timing issue
Datatable reload timing issue
Hi,
I see some strange behaviour using datatables. If there is a row selected I can delete the record clicking on the delete button.
After the ajax call I reload the table.
However, if I request the selected rows from the table right after the reload it still gives me the selected row
dt.ajax.reload(null, false);
console.log(dt.rows( '.selected' ).data());
If I put console.log(dt.rows( '.selected' ).data());
in a setTimeout its not selected anymore.
Is there any fix without the setTimeout? Is there a dt.ajax.reload().done() ?