Hey.
Datatable.showItem() only takes 1 parameter (rowID). What if I’m selecting a cell (not a row) that is currently outside the scroll? Is there anyway to do that?
Cheers.
Hey.
Datatable.showItem() only takes 1 parameter (rowID). What if I’m selecting a cell (not a row) that is currently outside the scroll? Is there anyway to do that?
Cheers.
As a solution, you can use showItem()
to show a needed row and then call the scrollTo method.
To calculate the scroll position, you can use something like
var columns = table.config.columns;
var sumWidth = 0;
for (var i = 0; i < columns.length; i++){
if (columns[i].id == "columnToScrollTo") break;
else sumWidth += columns[i].width;
};