I have a gallery that is going to have variable lengths based on previous input. For example, if I select Option A the gallery will have 4 items and if I select Option B it will have 2 items. For each item in the gallery, I want to be able to search and select from a dropdown a result. So Option B will have 2 search boxes and dropdowns.
The search box will filter out data from a table based on what is inputted. And I want to be able to select in the dropdown for that specific item if there are multiple results.
However, I am having trouble setting up the gallery so that that the dropdown can have its own set of results to choose from.

As seen in the picture, I can search in the first box. When I hit the search button, I have it perform an UpdateContext to set it to a filtered out table. Using that context table, the dropdown will perform a GroupBy to show the results to select from.
Since I am updating the same context with each search button, all of the dropdowns will show the same results since it is performing a GroupBy on the same context table.
To fix this, I am thinking of having a varying number of collections that each search will filter from the original data table and update, allowing each dropdown to source from its own collection. Open to suggestions on if there is a better way of doing this. Thanks!