Reputation: 6899
On my page there are several region that are hidden or shown based on a condition. I set a variable calculation before regions and then on change of that variable I show/hide various regions. Everything works as expected but I've noticed that when I refresh the page, for a split second I see the hidden regions flash and then disappear. Any way to fix that?
Upvotes: 0
Views: 842
Reputation: 18630
What happens is that the DOM is rendered and once the page is loaded, the dynamic action fires. There is a brief moment between the page fully rendered and the dynamic action firing and that is when you see the component flash. All a dynamic action of type "Hide" does, is set the css style display:none;
on the component.
A very simple workaround to prevent the flashing is to set "Custom Attributes" to style=display:none;
for the region that should be hidden on page load. That way the component will not show but immediately be hidden.
Upvotes: 2