How to properly use capture alert.open() event from scanner

Hello everyone,

I'm struggling to properly show the correct data once the scanner "scans" and the pop-up alert shows.

I'll explain the following screenshot:

On the backgroud, the text components show the current information of the scanned QR based on the last scanned item; in this case scanner1.data[4].

But, the capture alert.open() event shows the previous scanned QR (scanner1.data[3]). How can I achieve that it waits or gets the most update data?

I've tried several ways with the "Only Run When" option, but I can't make it work :frowning:

Thanks again!

Hi @Adorp, we need a bit more details to get to the bottom of this. :face_with_monocle:
Could you share how you are referencing the last scanned item on the notification modal? I wonder if we are referencing it by using scanner1.data[-1]. If this is the case, the data slice of state for "scanner1" may not be done updating before we scan the new item. This could lead to the notification modal showing the previous last item.