How to clear an repeating group

My problem:
The user insert a value then my app use an api to search it, then show it on a repeating group. Ok, this works pretty well, but when the user modify the input value, the api will be loaded again, and then show the new results, but until show the newest result, the old images still in repeating group (the texts changes fast, but images are slower).
I want to know a way to “clear” the old data, or, make the image looks like a loader (like, it’s loading… wait). My idea was to make a conditional to the image, but conditional “image is loading” doesn’t exists.

If anyone wants to test the app:

Some wallets to insert and test it (one each time):
(I recomend to use Collected toggle)
tz1W5C3scSjmfzgxkkXgQeRUrLoHWakHhET1
tz2Ws8bEV96iUHGGZbhtmcbr1nP1LysvrWTU
tz1ZJvqkCy4cVfgk3FP7shjsNcfmwYVpzTRG
tz1cGMcCyJqgCsG6V8fWwVTXBuhQjioptFNd

@gutowlach

Hey, sorry, not exactly i want. I think this doesn’t work for me because my data source cames from a API, idk. I tried to put a button just with this workflow and doesn’t work, the data keeps there, probably because data source still the same.

@gutowlach

  • Yes/no custom state called clear?
  • Set it to yes when you need to clear the rg
  • Have a condition on the rg … when clear? is yes then data source empty (do not set any expression here so that it clears it)

Hope the above makes sense

This topic was automatically closed after 69 days. New replies are no longer allowed.