Dynamic components duplicated/stacking when reloading screen or re-clicking button

Every time I click my button to load my dynamic list, the new items get added to the existing ones instead of replacing them. When I press back and return, the list keeps growing bigger and bigger.
I make list using Dynamic card view and other dynamic component.

What I want to achieve:

I want to completely clear the old dynamic components before generating a fresh list when the button is clicked.

PLEASE HELP

Hi,

Before generating a new list, you first need to delete the old components.

So you should loop through all the IDs you’ve created and use the corresponding Delete Component blocks (Label, CardView).

Or you could switch to the DynamicComponents extension, or even better, RecyclerList, since you’re creating a list.

I know the logic is a bit more complex, but if you need help, the community is full of examples and people willing to help.

1 Like

can you show me the block

  • DynamicComponents?
  • RecyclerList?
  • Native components?

:grin: