SelectedRow with Expandable table?

Hi All,

Need some help with expandable table and opening multiple rows.


  1. If I open a row, all is god. Parts for the that product is listed as expected.

  2. If I select a new row and open this. The first row I expanded is updated with parts from the second selected product.

What I expected and want is:

This is my SQL code I use with 3 tables.
-TableProduct with ProductID
-TablePartProductXref with ProductID and PartID
-TablePart with PartID

Table for products (expandable table - Product_table)
, IF(TPP.PartProductID > 0,'Yes','No') AS 'Has Parts'
From TableProducts PRO
Left Join TablePartProductXref TPP ON TPP.ProductID = PRO.ProductID
Table listing parts for product (child table - Part_table)
Select *
From TablePart TSP
INNER JOIN TablePartProductXref TPP ON TPP.PartID = TSP.PartID
Where TPP.ProductID = {{product_table.selectedRow.ProductID}}

Is the other functions then selectedRow that I shall use?
I do not have any experience with Javascript. If a script is needed. Please help with a code.

In advance,
Thank you for your help