Hi, If i have a UdTable that is rendering a lot of information, but also has a UdDynamic in it that refreshes every 1 second (a timer), if i then sync that table UdDynamic i get HTML code up until it completes the refresh of the table. Is there is a way to hide this code?
You can see an example of this by running this code, then press ‘Sync’:
$Data = [pscustomobject]@{
1 = 1
2 = 2
}
$Session:CountUp = 0
New-UDGrid -Container -Content {
New-UDGrid -Item -ExtraSmallSize 6 -Content {
New-UdDynamic -Id "MyDynamic" -Content {
$Columns = @(
New-UDTableColumn -Property 1 -Title "1"
New-UDTableColumn -Property 2 -Title "2"
New-UDTableColumn -Property 3 -Title "3" -Render {
Start-Sleep 2
}
New-UDTableColumn -Property 4 -Title "4" -Render {
New-UdDynamic -AutoRefresh -AutoRefreshInterval 1 -Content {
$Session:CountUp++
New-UDTypography -Text "$($Session:CountUp)"
}
}
)
New-UDTable -Data $Data -Columns $Columns
}
}
}
New-UDGrid -Container -Content {
New-UDGrid -Item -ExtraSmallSize 6 -Content {
New-UdButton -Text "Sync" -OnClick {
Sync-UdElement -Id "MyDynamic"
}
}
}