Extract selected rows from table, respecting sort order

I have a table with sortable columns and multi-select enabled.

Is there an easy of retrieving the data from the selected rows, in the order that they are displayed on screen?

table.selectedRow.data seems to only have the original source order.

Even displayedData does not match what's actually displayed:

Hey @wabiloo!

You might be able to use the .sortedColumn property to sort your data with lodash's orderBy function:

{{ _.orderBy(table1.selectedRow.data, [table1.sortedColumn], table1.sortedDesc ? 'desc' : 'asc') }}

Does that work?
sorted_multi_row_select.json

1 Like