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
Having a wildcard views like this ends up having them in the auto menu that is created based on the createMenuItems utility from @vaadin/hilla-file-router/runtime.js:
/views
├── +customers
├── /products
│ ├── {id}
│ │ ├── edit.tsx
│ │ └── @index.tsx
│ ├── @index.tsx
│ ├── new.tsx
│ └── {...wildcard}.tsx <- shows up in the menu
├── @index.tsx
└── {...wildcard}.tsx <- shows up in the menu
Like this:
Workaround
The wildcard views can be excluded from the menu explicitly using the exported ViewConfig:
The original definition was that routes should be in the automatic menu only if we can generate a sensible URL to that route. That's not the case in this example.
But it would be the case if there would be no @index routes and we change the definition of wildcards to also match with an empty parameter value in case there's no @index. If we implement make that change, then we also need to update the menu generation so that some specific wildcards might end up in the menu.
Describe the bug
Having a wildcard views like this ends up having them in the auto menu that is created based on the
createMenuItems
utility from@vaadin/hilla-file-router/runtime.js
:Like this:

Workaround
The wildcard views can be excluded from the menu explicitly using the exported ViewConfig:
Expected-behavior
Wildcard views should be filtered out automatically by the
createMenuItems
utility.Reproduction
You can find the reproducible example here.
System Info
Vaadin: 24.7.0.rc1
The text was updated successfully, but these errors were encountered: