-
Notifications
You must be signed in to change notification settings - Fork 167
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
AfterNavigationEvent should give access to RouteParameters as well #9993
Comments
Could you also describe a use case where this information would be useful? |
Did you have a specific case in mind where those would be needed? Looking at the code, it should be fairly trivial to include the parameters into https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/router/internal/AbstractNavigationStateRenderer.java#L238 as the parameters are available there. But creating those in https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/server/BootstrapUtils.java#L160 requires some effort or code duplication to create the parameters. |
Nothing specific in mind; it's only a personal preference of listening to I was just curious why AfterNavigationEvent lacks stuff which BeforeEvent contains. Looks a bit strange to me since both events are quite similar (they're both navigational events). |
I got the same "problem". In my Vaadin application (done in Vaadin 14.x pre 14.5), I'm using AfterNavigation to highlight the menu like it's explained in the documentation: From the documentation:
The breadcrumb could need the parameter like: Home>Books>Edit Book 3 |
Adds a getter for RouteParameters in AfterNavigationEvent. Fixes #9993
This ticket/PR has been released with Vaadin 24.3.0.alpha1 and is also targeting the upcoming stable 24.3.0 version. |
There's
BeforeEvent.getRouteParameters()
but there is no suchAfterNavigationEvent.getRouteParameters()
.Versions:
The text was updated successfully, but these errors were encountered: