Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$WebEvent.Data is Empty PodeWebEvent #598

Open
Stefan774 opened this issue Jul 8, 2024 · 0 comments
Open

$WebEvent.Data is Empty PodeWebEvent #598

Stefan774 opened this issue Jul 8, 2024 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@Stefan774
Copy link

Stefan774 commented Jul 8, 2024

Describe the Bug

$WebEvent.Data is empty when PodeWebEvent (Change) is executed.

Steps To Reproduce

Let's take this example from the Tutorial Page:

New-PodeWebSelect -Name 'Role' -Options @('Choose...', 'User', 'Admin', 'Operations') |
    Register-PodeWebEvent -Type Change -ScriptBlock {
        $WebEvent | Out-Default
        $ElementData | Out-Default
        $ParentData | Out-Default
        Show-PodeWebToast -Message "The value was changed: $($WebEvent.Data['Role'])"
    }

The change event is fired correct but $WebEvent.Data is empty:

Name                           Value
----                           -----
PendingCookies                 {}
Ranges
Timestamp                      08.07.2024 08:28:44
Route                          {[UsingVariables, ], [Path, /pode.web-dynamic/elements/select/select_page_services_single/events/change], [Logic, …
Streamed                       True
ErrorType
TransferEncoding
Query                          {}
Cookies                        {}
OnEnd                          {}
Endpoint                       {[Address, localhost:89], [Name, d5c6c2af-276d-a243-7d3b-f24953991573], [Protocol, http]}
Data                           {}
Method                         post
Request                        Pode.PodeHttpRequest
Path                           /pode.web-dynamic/elements/select/select_page_services_single/events/change
Response                       Pode.PodeResponse
Files                          {}
Metadata                       {[SenderId, dbacce36-6bb2-4c0a-b111-a9aac0aa4fa0]}
Auth                           {}
AcceptEncoding
Parameters                     {[0, /pode.web-dynamic/elements/select/select_page_services_single/events/change]}
Sse                            {[Group, page_services], [IsLocal, False], [Name, Pode.Web.Actions], [LastEventId, ]…}
ContentType                    application/x-www-form-urlencoded; charset=UTF-8
StaticContent
Lockable                       {}

Expected Behavior

Like in Pode.Web 8.x $WebEvent.Data should be filled with the selected values

Platform

  • OS: Windows
  • Browser: Chrome, Edge
  • Versions:
    • Pode: 2.10.1
    • Pode.Web: 1.0.0-preview2
    • PowerShell: 7.4.2
@Stefan774 Stefan774 added the bug 🐛 Something isn't working label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant