Scroll Up after using draw() function in angularJs
Scroll Up after using draw() function in angularJs
knetadmin
Posts: 47Questions: 1Answers: 0
Thanks for replay i applied the part you motioned about :
setTimeout( function () {
DTInstances.getLast().then(function (dtInstance) {
dtInstance.DataTable.rows().invalidate().draw();
});
}, 0 );
But the new issue appeared after each update, scroll go to up always i am stop scroll down because of that i can see the end of datatables
This discussion has been closed.
Replies
Hi,
The
draw()
method, when called without any parameters will reset the paging / scrolling, which is what I think you are seeing in this case. Apologies, I should have thought of that when I wrote the above code!The fix is actually quite simple, just pass
false
to thedraw()
method.Regards,
Allan
Thank you very much for quick answer, it is working fine now