Imagine a table with 100 rows. Any selected row (`table.selectedRow.index) will have an index from 0 - 99.
Now filter that table, let's assume that there are 2 rows showing. When you select these rows the available indexes are 2, 0-1.
Grabbing the data from the table, when filtered (
table.data) retrieves all 100 rows.
This pretty much makes it impossible to update table which has been filtered.
In my scenario, which I have seen others express here, you perform and action on button click of a row. Perform some logic or other goo, then update the row to reflect the changes. For clarity, updating by grabbing the table data, updating the indexed value of that array (table data) and putting it back into the table. E.g.:
const tableData = table.data; const row = table.selectedRow.data; const index= table.selectedRow.index; const newDataRow = someSuperDuperFunction(row); tableData[index] = newDataRow; table.setData(tableData);
there needs to be some consistency with filtered tables where the table data and selected index values are from the same dataset, either the filtered set or the entire data set.
I hope this makes sense. As things sit now there is no way to programmatically update the data in a table which is filtered.