Popup rendering behavior

I’m trying to overload a popup to show one of several multistate buttons. The visibile prop on each multistatebutton is initially set to false, and each has a binding with a simple expression that sets the visibility prop to true for the correct multistatebutton to show based on a param specified in the openPopup call. What I’m seeing is the rendering of multiple multistate buttons as if the popup is initializing it’s data, ignoring the visible prop for a instant on load, but then it finally shows correctly. It looks bad that it’s not a clean pop on the screen. Is this a known thing, or is there a trick to delay the view until it’s initialized, or anything like that? I tried with an xy container and also with a flex, and with mulistate buttons as well as embedded views of them, tried binding to the visible prop for xy and the display prop for flex but no luck on any of these tries. I could make 5 separate popups to avoid the behavior but if there’s an elegant way to fix it with one I would prefer it.

There are a couple of ways to fix this. You can wrap the expression with coalesce() to return a value during evaluation, or you can change the property to persistent so that the saved value is the default value on opening.

1 Like

(post deleted by author)

Beautiful - setting persistent on the visible prop did the trick.(I tried the coalesce, then setting persistent on the buttons, but it was the visible prop that did it.) Thank you!

1 Like

I should note that persistent has some caveats. You can read details on it here, Perspective view first rendering - Ignition - Inductive Automation Forum