Pode.Web
Pode.Web copied to clipboard
Unable to update form fields in a modal, when showing it using Show-PodeWebModal
Describe the Bug
When showing a modal and using the Actions parameter, containing commands to update the form fields in the modal, the form fields are not updated.
Steps To Reproduce
Add-PodeWebPage -Name Testpage -ScriptBlock {
New-PodeWebButton -Name Test -ScriptBlock {
Show-PodeWebModal -Name EditFunction -Actions @(
Update-PodeWebTextBox -Name FunctionName -Value "Testing"
Set-PodeWebSelect -Name Process -Value 2
)
}
New-PodeWebModal -Name EditFunction -DisplayName 'Add/Edit Function' -CloseText 'Cancel' -SubmitText 'OK' -Size Medium -AsForm -Content @(
New-PodeWebTextBox -Name FunctionName -DisplayName 'Name' -Value ''
New-PodeWebSelect -Name Process -Options @(1, 2, 3) -DisplayOptions @('One', 'Two', 'Three')
) -ScriptBlock {
Write-Host "TestModal"
}
}
Expected Behavior
The text field in the modal should get value 'Testing' and the select should get option 'Two' selected.
Platform
- OS: Windows
- Browser: Edge
- Versions:
- Pode: 2.10.1
- Pode.Web: 1.0.0
- PowerShell: 5.1
Additional Context
Worked fine in 0.83