Wrap the conditional div within a show/hide div. Any data within the condition you can use a flow to wait 200ms, should give the page enough time to load, then run the Action to fetch the data. That way the page loads quicker, the user gets the page, and by the time they want to view the data its loaded, or even have the Action set to no load, and fire the load on an event which triggers the flow to fetch the data, and that way no data is loaded that is not requested by the user.
Are you using dmx-show or dmx-hide? Hopefully you’re using dmx-show.
dmx-show will hide the element (by adding style="display: none !important; on the element) and only when data is returned that matches your When condition will the element display.
dmx-hide will display the element until data is returned that matches your When condition and only then will it hide the element by adding style="display: none !important;.
This happens consistently, and it is indeed due to the condition waiting for server data.
I prefer using condition over show-hide because show-hide the data etc. still loads in the dom but with condition it doesn’t.
However, if I can’t resolve the issue through other means then I typically use a show-hide as well as the condition as per some of the recommendations above.
It’s a bit frustrating but this is the only workaround right now I believe.
I’m hitting against this now, I’ve tried every option mentioned here and it’s still flashing for an instant before page loads fully (I’m using a preloader too). It’s very annoying, hopefully we can get a better solution to resolve this.