Ran into this issue while updating an app to AC2. We have a lot of custom JS libraries and code which make use of the dmx object to get things done.
We have a setup when on click of an element inside a custom JS component (not AC2 component), I need to select that ID in a data detail.
The code looks something like this:
With AC1, this was working fine. But with AC2, I get an error in console saying cannot read start_time. If I add a setTimeout around the second line with 300ms, it works fine.
300ms is just a random delay which works on one system, might easily break for other users and systems. How can I ensure that the value has been selected in data detail, reliably, so that I can execute the steps below it?
Update:
Just encountered same issue in inline-flow on page as well.
In the flow, first step is dd1.select, and next step uses the value from dd1.data.prop1 - which is resulting in null.
Have updated the title of the issue as this issue does not seem to be confined to JS.
Too slow in this case actually.
DataDetail returns values in data property, after something has been selected. In my case, after the select step, when I am trying to read the data property, it has not been set yet.
yeah...
The way you describe it, it seems that there is a tiny "gap" between selecting a DataDetail rec and actually manipulating its content/attributes
But if there is a gap in that case, a few other cases comes to mind that will need more attention also...
I have no AC2 for now so I can't play actually with it
This seems to be working well. Thank you.
Took some time to test it since I got into another issue. Not sure yet if related to AC2. Will create another post if it is.