[BUG] Can't fnUpdate whole not-loaded-row w/ DataTable 1.10.20 + Scroller 2.0.1 + jQuery 1.12.4

[BUG] Can't fnUpdate whole not-loaded-row w/ DataTable 1.10.20 + Scroller 2.0.1 + jQuery 1.12.4

RedSwordRedSword Posts: 1Questions: 0Answers: 0
edited October 2019 in Free community support

Hi,

I was able to successfully error when doing the following :
1- Load a DataTable with Scroller
2- Call fnUpdate with an array (3rd argument undefined ==> we update whole row ==> row() is called in fnUpdate which causes error, while cell() doesn't), for an NOT-YET-LOADED row.

A workaround solution is to manually edit every column of the said row.

The following error triggers w/ an array :

jquery.dataTables.js:8159 Uncaught TypeError: Cannot read property 'id' of null
at _Api.<anonymous> (jquery.dataTables.js:8159)
at _Api.data (jquery.dataTables.js:7196)
at n.fn.init.DataTable.fnUpdate (jquery.dataTables.js:815)

For more info see the following : **http://live.datatables.net/zabojama/1** or https://jsfiddle.net/ovh0ejyc/1/

Open console, reset table, try "SetLine100ToXXX", see the above error in console. You can also scroll down and see the line isn't updated. Reset table, try "SetLine100ToXXXButAvoidError", scroll down to line 100. The line is updated. That later version update column-by-column instead of the whole line with an array.

I didn't try that many different versions, but the bug is also present while using DT 1.10.18 or Scroller 1.5.0

Red

Replies

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Hi Red,

    Thanks for letting me know about that and for the test case! I've just committed the fix and we'll add tests for it shortly. The nightly will carry the update soon. Its not that long since the 1.10.20 release, so I'll wait a little while before doing a .21 release with this fix in case anything else crops up.

    Allan

This discussion has been closed.