New-UDDynamic sync/refresh changed?

Product: PowerShell Universal
Version: 1.4.9
Framework: 3.1.6

Not sure if this is intended behavior or a bug, but there is one change starting from framework 3.1.6 that is currently preventing me from upgrading past 3.1.5.

When using Sync-UDElement or -AutoRefresh on a New-UDDynamic component, the entire component wrapped in the dynamic seems to be being removed/readded, instead of just refreshing. I like to wrap parts of my page in a dynamic to easily refresh, but with 3.1.6+, it causes a “blinking” effect to occur when refreshing. This is especially noticeable when surfaces (cards/papers, etc.) are wrapped in the dynamic.

Here is a video of it occurring with text in a modal.
Example code:

New-UDPage -Name 'Test' -Content {
    New-UDGrid -Container -Content {
        New-UDGrid -Item -Content {
            New-UDButton -OnClick {
                Show-UDModal -MaxWidth xl -FullWidth -Content {
                    New-UDCard -Content {
                        New-UDDynamic -id 'test-dynamic' -Content {
                            New-UDTypography -Text 'This is a test modal'
                        } -AutoRefresh -AutoRefreshInterval 1
                } -Footer {
                    New-UDButton -Text 'Close' -OnClick {

Would it be possible to return to the previous behavior New-UDDynamic?

Interesting. We had an issue where components weren’t refreshing at all that were within UDDynamics so it’s likely that change that is causing this. Maybe we got a little too aggressive with how we are reloading those components . I’m sure we can fix it and will open an issue for this.

I can see in the React dev tools that it is in fact removing and adding the components again so that’s not great.

Thanks for this topic! i face the same issue and was searching for a way to fix but looks like @adam is on the case… Its almost like a 1/2 second refresh time and does cause some issues.

Also noticed that the downloads section has 1.5.2 but the release notes have 1.5.3 released at the end of last month…?

PSU 1.5.2, UD 3.2.1


We are looking for a way to fix this , its not that simple, i hope we can fix it until next release

Haha, these things never are simple or easy! Cheers for looking into this! Could you post here if you want anything tested on a nightly or when the fix is in?


1 Like