Dynamically populate dropdown within listView containers

I have a very similar issue where I am generating a listView based on a user's selection in a multiselect drop down. Based on the number of items selected, a listView generates this many number of rows - for example, 2. Inside each of these child components is another dropdown whose values are determined by a query. Problem is, these sub-dropdown values are always the same for every generated dropdown. And it is the first row.


Although these 2 images look very similar, each selected accessory has different colour options. But you can clearly see the options are the same.

1 Like

Hi @AlexJordi! Welcome to the community. :wave:

I split your post out into a separate topic that subsequently slipped through the cracks. Is this still a problem that you're looking to solve?

The crux of the issue is that we define the appearance and behavior of every element in a repeatable based on the very first element. In this case, the query you've defined for populating the accessory_option_selector is only running once - for the first element - and using the results for every subsequent element in the repeatable.

Generally speaking, the best way to prevent this is to pass all the data you may need into the list view from the very beginning. If you don't want to fetch the options for every since accessory in your dropdown menu, you can optionally connect the query as a "Change" event handler, instead.

Let me know if you'd like more detail or have any follow-up questions!