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

LeftNavigationItem Highlighting is triggered by unrelated Navigation #347

Open
realulim opened this issue Oct 14, 2020 · 2 comments
Open
Labels

Comments

@realulim
Copy link

Describe the bug
When you have a view that is not represented as a LeftNavigationItem in the LeftResponsiveHybrid menu and navigate to it by external means (such as a button or even typing the URL), then an apparently random LeftNavigationItem is highlighted.

To Reproduce
Steps to reproduce the behavior:

  1. Take one of the examples and add a TestView with route "test".
  2. Point your browser to "/test"

Expected behavior
None of the LeftNavigationItems should be highlighted.

** Additional Information (please complete the following information):**

  • OS: Linux
  • Browser: Firefox
  • Version: 70
@realulim realulim added the bug label Oct 14, 2020
@realulim
Copy link
Author

A workaround is to add a LeftNavigationItem for the view and set it as invisible.

@eidottermihi
Copy link

A workaround is to add a LeftNavigationItem for the view and set it as invisible.

If the view uses URL templates (Vaadin 14.5+) like @Route("/foo/:someId") this workaround does no longer work.

Constructing the LeftNavigationItem throws an exception with root cause: com.vaadin.flow.router.NotFoundException: No route found for the given navigation target and parameters!

So the only option right now is to not use URL templates for Views which are not represented as Navigation item 😢

appreciated added a commit that referenced this issue Oct 18, 2021
- added UnrelatedView10 as an example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants