You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set-UDElement doesn't work on CheckBox.
Doesn’t look like New-UDCheckbox has implemented “Set-UDElement” functionality as of now.
It’s not implemented on New-UDSelect either.
To Reproduce
Make a choice in the Select, the OnChange event is triggered and the switch works properly but the checkboxes are never updated …
Describe the Issue
Set-UDElement doesn't work on CheckBox.
Doesn’t look like New-UDCheckbox has implemented “Set-UDElement” functionality as of now.
It’s not implemented on New-UDSelect either.
To Reproduce
Make a choice in the Select, the OnChange event is triggered and the switch works properly but the checkboxes are never updated …
Script Sample
New-UDCheckBox -Id "Intranet" -Label $Cache:ADGroupIntranet.Name -Checked -OnChange { }
New-UDCheckBox -Id "IwsUsers" -Label $Cache:ADGroupIWSUsers.Name -Checked -OnChange { }
New-UDSelect -Id "EmployeeIDSelect" -Label "Utilisateur" -Option {
New-UDSelectOption -Name "sans matricule connu" -Value "NEWMAT"
New-UDSelectOption -Name "avec matricule" -Value "Saisir le matricule"
New-UDSelectOption -Name "externe" -Value "EXTERN"
} -OnChange {
switch ((Get-UDElement -Id "EmployeeIDSelect").Attributes["value"]) {
"NEWMAT" {
Remove-UDElement -Id "EmployeeID"
Set-UDElement -Id "Intranet" -Attributes @{
checked = $true
}
Set-UDElement -Id "IwsUsers" -Attributes @{
checked = $true
}
}
"EXTERN" {
Remove-UDElement -Id "EmployeeID"
Set-UDElement -Id "Intranet" -Attributes @{
checked = $false
}
Set-UDElement -Id "IwsUsers" -Attributes @{
checked = $false
}
}
Default {
Add-UDElement -ParentId "EmployeeIDColumn" -Content {
New-UDTextbox -Id "EmployeeID" -Placeholder "Matricule"
}
Set-UDElement -Id "Intranet" -Attributes @{
checked = $true
}
Set-UDElement -Id "IwsUsers" -Attributes @{
checked = $true
}
}
}
}
Version Information
The text was updated successfully, but these errors were encountered: