Flex repeater not updating on instance change

I have a script that updates a database, and a Flex Repeater is used to display all instances of that database. The issue is that after the database updates, the repeater instances correctly contain the new data, but visually they continue to display the old information.

I’ve tried several approaches to resolve this:

  • Setting the repeater instances to null and then reassigning the correct data

  • Introducing a sleep/delay between updates in case there was a race condition

  • Explicitly setting the instances’ data to an empty array ([])

None of these attempts worked. Even when the data is cleared entirely, the UI still shows the previous values.

Obviously, there must be a proper way to force the repeater to re-render or refresh its visual state. I’m hoping someone has insight or experience with this issue before I resort to something drastic, like deleting and recreating the component on every update.

I figured it out; it seems that when I had it set the instances to none and then back to the refreshBinding it never saw the none. resulting in it never seeing the refreshBinding as a new value and therefore not refreshing. by adding a delay between the two it allowed it to consider it a new value and visibly refresh. I hate race conditions.

1 Like

Do your instances have a nested parameter or a dict parameter ?

I’ve encountered similar situations when my instances do not have simple value parameters.

they are nested