How do get selected row in table1 to change the data in table2 as well as filter to id

I have a table that lists all payments cards available, I want to be able to click on the selected row and display the transactions of that card in another table located below

Hey there,

There are multiple ways of doing this:

  1. First table will list all cards, 2nd table will be all transactions filtered by the card selected using .filter()

  2. Your other option would be to load table with data from a query (i.e. {{transactions.data}}) where transaction query would be depending on resource something like this

SELECT *
FROM transactions
WHERE card_id={{tableCards.selectedRow.data.id}}

Hope that points you in right direction, let me know if I can help somehow.

1 Like