Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
I am using the file-based router which allows wildcards. E.g., I have the following folders/files in my folder views:
authors/@index.tsx
authors/{id}.tsx
So I can access the URL /authors to get a list of all authors and /authors/3 to see the details of an author with id 3. That works fine.
Now I have a SideNav with a parent collapsible SideNavItemConfiguration and a child SideNavItemAuthors linking to /authors. When I select an author from the list (go to the details page /authors/3), the SideNavItemAuthors is not activated anymore, which looks especially weird since the parent item Configuration is collapsed. There is no way to define a wildcard-PathAlias to keep the SideNavItem active.
Describe the solution you'd like
Allow wilcards in the PathAlias like /authors/{id} or /authors/* in the SideNavItem.
Describe alternatives you've considered
Workaround: Create a view authors/detail.tsx and put the id in a query param (/authors/detail?id=3). Then authors/detail can be used as a PathAlias and works. However, considering the design of the file based routing, this does not seem right.
Describe your motivation
I am using the file-based router which allows wildcards. E.g., I have the following folders/files in my folder
views
:So I can access the URL
/authors
to get a list of all authors and/authors/3
to see the details of an author with id 3. That works fine.Now I have a
SideNav
with a parent collapsibleSideNavItem
Configuration and a childSideNavItem
Authors linking to/authors
. When I select an author from the list (go to the details page/authors/3
), theSideNavItem
Authors is not activated anymore, which looks especially weird since the parent item Configuration is collapsed. There is no way to define a wildcard-PathAlias to keep theSideNavItem
active.Describe the solution you'd like
Allow wilcards in the PathAlias like
/authors/{id}
or/authors/*
in theSideNavItem
.Describe alternatives you've considered
Workaround: Create a view
authors/detail.tsx
and put the id in a query param (/authors/detail?id=3
). Thenauthors/detail
can be used as a PathAlias and works. However, considering the design of the file based routing, this does not seem right.Additional context
No response