Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81688

fnUpdate bug in 1.9.4?

$
0
0
Hello, I've noticed that fnUpdate( [row], pos, col) no longer works as expected when col == 1 (or any other number). The documentation says that col is ignored if the data passed in is an array, but what actually happens is that it puts the passed in array into the column. So when I do this:

fnUpdate([1, 2, 3, 4, 5], 1, 1)

I get something like

[1, [1, 2, 3, 4, 5], 3, 4, 5]

instead of

[1, 2, 3, 4, 5]

The code comments say

oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1, 0 ); // Row

But the code itself does the following check

if ( $.isArray(mData) && iColumn === undefined )

So it appears that the docs and comments are incorrect and that col must be undefined for the array case to work.

Viewing all articles
Browse latest Browse all 81688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>