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 {
Hide-UDModal
}
}
}
}
}
}
Would it be possible to return to the previous behavior New-UDDynamic?