Cascading dropdown in a ListView possible?

I have two dropdowns in my listview, both bound to db queries.

When a user selects and item on the first dropdown, the second reevaluates its query based on the first selected value. This works fine for the first row.

The problem is the second dropdown in all subsequent rows added never updates when choosing item from the first. Another side effect is that when I add a new row, all selected values on all rows get wiped out.

How can I get cascading dropdowns to work in a listview, so that their queries do not interfere with each other?

Just bumping this, struggling to get this functionality working.

Could you send a screenshot or video so we can get a better visualization of what you are trying to do or how it is failing?

1 Like

It seems as though you may be able to use a temp state that stores query results, if you trigger a JS query directly from your listview you'll have access to the index it was triggered from with the i variable, you can then use that to pass the query data back to the appropriate index in the temp state with something like

const data = await query.trigger();
tempstate.setIn([i], data);

curious if yall find that to be a good fit here :slightly_smiling_face:
listview_db_query (1).json