Issue with New-UDSwitch

Hi guys, I think this might be a bug but I thought I’d ask here first before posting on GitHub. I’m using a switch to enable/disable a text box however when the text box is enabled, it loses the animation. Here is an example of what happens and some example code:

UDSwitch

Get-UDDashboard | Stop-UDDashboard
AzureTheme=Get-UDTheme | Where-Object {_.Name -eq “Azure”}
$TestDashboard = New-UDDashboard -Theme $AzureTheme -Content {
New-UDSwitch -Id ‘switch’ -OffText “No” -OnText “Yes” -OnChange {
if ($EventData -eq $true) {
#switch is on
Set-UDElement -Id ‘textbox’ -Attributes @{disabled = $false}
}
elseif ($EventData -eq $false) {
#switch is off
Set-UDElement -Id ‘textbox’ -Attributes @{disabled = $true}
}
}
New-UDTextbox -Id ‘textbox’ -Label “This textbox is enabled and disabled” -Disabled
New-UDTextbox -Id ‘textbox2’ -Label “This is a normal textbox”
}
Start-UDDashboard -Dashboard $TestDashboard -Port 10001

Has anyone come across this before?

Update - this also happens with checkboxes. I have opened a GitHub bug for this issue.