Skip to content

Instantly share code, notes, and snippets.

@TimCurwick
Created February 4, 2019 22:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimCurwick/4c0dadc8eeae3f283626c9adb6a9892b to your computer and use it in GitHub Desktop.
Save TimCurwick/4c0dadc8eeae3f283626c9adb6a9892b to your computer and use it in GitHub Desktop.
$Session:Loading = $True
New-UDElement -Id Loading -Tag div -Endpoint {
If ( $Session:Loading )
{
New-UDCard -Content {
New-UDHeading -Text 'Loading data...'
New-UDPreloader -Size Small }
}
}
New-UDElement -Id Data -Tag div -Endpoint {
New-UDGrid -Headers $Headers -Properties $Headers -Endpoint {
Get-DataSlowly | Out-UDGridData
$Session:Loading = $False
Sync-UDElement -ID Loading } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment