ironmansoftware / universal-dashboard

Build beautiful websites with PowerShell.

Home Page:https://universaldashboard.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After using Set-UDElement to set value of input, cannot retrieve value with Get-UDElement

FixFlare opened this issue · comments

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)

  1. Start Dashboard
  2. Create a New-UDForm with at least one text input.
  3. Set the value of the input using Set-UDElement
  4. 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