ScrollX causes error when deleting all rows of last page
ScrollX causes error when deleting all rows of last page
Link to test case: https://live.datatables.net/hiniqeni/1/edit?js,console,output
Error messages shown: settings.aoData[idx] is undefined
Description of problem: When scrollX is set to true in the table options, deleting all rows of the last page causes the error in question. With scrollX set to false, the problem doesn't occur.
I came across this error in my app, wanted to see if a minimal example in live.datatables.net would have the same result. In both cases there is an error in the _fnScrollDraw function when scrollX is set to true. Any help is appreciated.
Replies
Hi,
My apologies for the delay in getting back to you about this. That is certainly a bug - and I'd go a little further to say that the behaviour without scrolling is also wrong. It should never show an empty
tbody.I've committed fixes for the issue now:
Here is the example updated with the current nightly build to show the fix.
Many thanks for letting me know about this error!
Allan