The use of row(index) where index is display number or model number
The use of row(index) where index is display number or model number
I am trying to interpret the bahaviour of myTable.row(index, {order:'current'})
versus myTable.row(index, {order:'index'})
where index
is a number.
The documentation says that in first case index
is a position of the row in model data. That means, if I have originally initialized table with array originalData
of five elements, then myTable.row(4, {order:'index'})
will return the last row, despite of sorting and filtering applied. Basically myTable.row(4, {order:'index'}).data() = originalData[4]
.
The documentation says that in second case index
will be the number of row on the screen, that means, after all sorting & filtering is applied. However I cannot prove that. In my case myTable.row(0, {order:'current'}).data()
still returns first row from model, however I have reverted the order via column sorting (thus it should return the last one).