My dashboard loads data into a table and allows users to choose options which refresh the data in the table based on the users input. It takes a few seconds for the data to be retrieved so I am using New-UDDynamic with -LoadingComponent to show a progress spinner. This works fine when the dashboard first loads but when options are chosen and the data refreshes using Sync-UDElement the New-UDProgress -Circular does not seem to run. As a result it looks my dashboard is hung. The code below reproduces this issue in simple code
New-UDPage -Name "loading" -Content {
New-UDButton -Text "Sync Tab" -OnClick {
Sync-UDElement -Id "Current"
}
New-UDTabs -Tabs {
New-UDTab -Text 'Dynamic Loading in a Tab' -Content {
New-UDDynamic -Id "Current" -Content {
Start-Sleep -Seconds 10
New-UDTypography -Text "$(Get-Date)"
} -LoadingComponent {
New-UDProgress -Circular
}
}
New-UDTab -Text 'Tab 2' -Content {
New-UDTypography -Text "$(Get-Date)"
}
}
}
When the page loads it will show the progress bar and then display the data, if you click the “Sync Tab” button it will sync the dynamic data but will not show a progress bar, after the sleep the dynamic date will update with no indication spinner.
I am running version 1.5 nightly build