After using Set-UDElement to set value of input, cannot retrieve value with Get-UDElement
FixFlare opened this issue · comments
FixFlare commented
Describe the Issue
I'm trying to set the value of an input on New-UDForm and when I set the value the value does show in the input and upon inspecting the element but when using Get-UDElement the value is null.
To Reproduce
Steps to reproduce the behavior: (Example)
- Start Dashboard
- Create a New-UDForm with at least one text input.
- Set the value of the input using Set-UDElement
- Get the value of the input with Get-UDElement
Expected behavior
Expect the value to be retrieved by Get-UDElement
Screenshots
An additional issue is when setting the value programmatically the CSS class "MuiFormHelperText-filled" is not applied so the text overlaps:
See example here
Script Sample
New-UDForm -id 'vmRequest' -Content {
New-UDTextbox -Type 'text' -id 'test' -Label 'test' -Placeholder 'this is a test'
}
New-UDButton -Text 'Copy' -OnClick {
Set-UDElement -Id 'test' -Properties @{
value= 'new value'
}
Show-UDToast -Message ((Get-UDElement -Id 'test').Attributes.value)
}
Version Information
- Universal Dashboard Version: v3 nightly