Never really used transitions before although it would be nice to start using them.
My use case, is a select box with 3 options, depending on which one you choose a slide or fade transition provides information about each selected option over to the right hand side.
I’ve a feeling this will need to be a feature request, but so far, I’ve tried to get my select box value from either a $session: var, or using Get-UDElement (in order to determine what to show in my card within the transition itself) but neither work. Everything rendered inside the transition appears to be static.
Example code:
New-UDGrid -Container -Content {
New-UDGrid -Item -ExtraSmallSize 6 -Content {
New-UDSelect -Option {
New-UDSelectOption -Name 'Identity' -Value "Identity" -Icon "user-group"
New-UDSelectOption -Name 'Filter' -Value "Filter" -Icon "filter"
New-UDSelectOption -Name 'OU Location' -Value "SearchBase" -Icon "folder-tree"
} -Label "Lookup Type" -Id "AccessReviewSettings_Select_Type" -OnChange {
$Session:ARLookupType = $EventData
Set-UDElement -Id 'AccessReviewSettings_Transition_LookupType' -Properties @{
in = $False
}
Start-Sleep -Milliseconds 800
Set-UDElement -Id 'AccessReviewSettings_Transition_LookupType' -Properties @{
in = $True
}
}
}
New-UDGrid -Item -ExtraSmallSize 6 -Content {
New-UDTransition -Id 'AccessReviewSettings_Transition_LookupType' -Content {
New-UDCard -Content {
New-UDTypography -Text "Test: $($Session:ARLookupType)"
}
} -In -Fade -Timeout 1000
}
}
The transition runs fine but the selected value doesnt update.
I’ve also swapped out the session value with a get-udelement inside the transition card and this also still just shows a static value.
For now I’ve just done this without the transition and a dynamic/sync instead.