stateSave with Scroller: Uncaught TypeError: Cannot read property 'scroller' of null

stateSave with Scroller: Uncaught TypeError: Cannot read property 'scroller' of null

craig91craig91 Posts: 9Questions: 3Answers: 0

Link to test case: https://jsfiddle.net/h5L8kxjo/
Error messages shown:
jquery-3.5.1.js:4055 Uncaught TypeError: Cannot read property 'scroller' of null
at HTMLTableElement.<anonymous> (dataTables.scroller.min.js:26)
at HTMLTableElement.dispatch (jquery-3.5.1.js:5429)
at HTMLTableElement.elemData.handle (jquery-3.5.1.js:5233)
at Object.trigger (jquery-3.5.1.js:8715)
at HTMLTableElement.<anonymous> (jquery-3.5.1.js:8793)
at Function.each (jquery-3.5.1.js:381)
at jQuery.fn.init.each (jquery-3.5.1.js:203)
at jQuery.fn.init.trigger (jquery-3.5.1.js:8792)
at A (jquery.dataTables.min.js:90)
at jQuery.fn.init.Aa (jquery.dataTables.min.js:86)
Description of problem:
When using the latest version of datatables with the scroller extension, if stateSave is set to true the above error is thrown. Not thrown when using an older version of scroller (e.g. https://datatables.net/release-datatables/extensions/Scroller/examples/initialisation/state_saving.html).

This question has accepted answers - jump to:

Answers

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

    Yep, I'm seeing that, thanks for the test case. It seems to have started in the last release 2.0.2. I've raised it internally (DD-1486 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • allanallan Posts: 63,212Questions: 1Answers: 10,415 Site admin
    Answer ✓

    Thanks! This is the fix and it will be in the nightly build shortly.

    Regards,
    Allan

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    And here it is working: http://live.datatables.net/gizusevi/2/edit

    Thanks for reporting the problem,

    Colin

  • craig91craig91 Posts: 9Questions: 3Answers: 0

    You guys work quick, thanks a bunch! :)

This discussion has been closed.