.row() returning wrong row from .cell( element )
.row() returning wrong row from .cell( element )
NewLIST
Posts: 7Questions: 3Answers: 0
in Bug reports
I think I may have found a bug in the latest version of DataTables. When calling the following code in a two-row table:
var rowData = $('#mytable').DataTable().cell( element ).row().data();
DataTables returns only the first row. I can console log that DataTables is getting the right .cell( element ), but then when it grabs the .row() it returns the first row instead of the second. Here's the debug link.
https://debug.datatables.net/ukevox
-Beau
This discussion has been closed.
Replies
Hi Beau,
Using
row()
like that is actually just usingrow()
without a selector. So it is selecting all rows and then truncating it to the first row found.What you want is:
Allan
Okay, cool. That works. That's probably what I get for coding at 3:00 AM. ;)
You can close this, Allan. Thanks again!