Uncaught error thrown when deselecting/selecting row after invalidating/updating a cell.

Uncaught error thrown when deselecting/selecting row after invalidating/updating a cell.

mscdexmscdex Posts: 6Questions: 3Answers: 0

Link to test case: https://jsbin.com/gugiwumabo/1/edit
Error messages shown: Uncaught TypeError: dtData._aSortData is null
Description of problem: With the Select extension, if you select all rows (using the header checkbox), invalidate/update one of the cells, then deselect a row by clicking its checkbox, the aforementioned uncaught error is thrown. It seems like any further clicks result in the error being thrown each time. At least cell().invalidate() and cell().data(value) seem to cause this issue.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Yep, I'm seeing that, thanks for reporting. As a workaround you can add a call to draw() after the cell().invalidate(), and that stops the error occuring - something like:

    dt.cell(1, 1).invalidate().draw();
    

    Here's that code updated,

    Colin

  • mscdexmscdex Posts: 6Questions: 3Answers: 0

    Looks like this is fixed now with Select v2.0.1.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I forgot to post back here - apologies. Yes, Select 2.0.1 saw a number of fixes, including this one. Thanks for posting back!

    Allan

Sign In or Register to comment.