Hello there, i have two tables and when i select row in table2 i use onRowSelect and then i select row from table 1. But in table1 is more rows and sometimes is selected row out of view. I like to scroll rows in table1 to selected row. Here is the code, everythhing works great, just wont scroll to selected row…
$w("#table3").onRowSelect( (event) => {
let tableRows = $w("#table1").rows;
let mappedRows = tableRows.map(items => items._id);
let userIndex = mappedRows.indexOf(event.rowData.event_id._id);
if (userIndex !== -1) {
$w("#table1").selectRow(userIndex);
$w('#table1').scrollTo(userIndex);
} else {
//console.log("Can't select, no data...");
}
});