Is there a way to have a different Tag List for each Table Row based on another column

I have a Tag column on this table. I want to be able to have different options for each row depending on the record type.

For instance if I have a row that has a category column value of Produce, I want the source column to have the options of ["Farmer Direct", "Distributor", "Other"], but if the category is Meat I want the source column to have the options of ["Local Butcher", "Packing Plant", "Other"].

I tried this:

{{ qryStatsConfig.data.find(el => el.category_key === tblStatDetails.selectedSourceRow.category_key ).options}}

But it only tests the first table row and applies that array to every other row.

I can't seem to find a perfect way to have this work, however I did think of an alternative - You could make a JS Transformer that did the work for you, e.g.

return data.map((item) => ({
  ...item,
  source: qryStatsConfig.data.find(el => el.category_key === item.category_key ).options
});

Whilst it's not perfect, it could be a way to get around it!

Hope this helps!

That sort of works and my originally idea also sort of works (once I fixed a bug in it.)

But the options keep changing and clearing in the table - it's hard to describe.

Fait to say, the table was not designed to accommodate this.