How to get all the children of a route, to set up a navigation? #1806
Unanswered
itshallrun
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Can you please provide a minimal complete example by forking one of the examples on stackblitz? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I set up the following navigation properly.
For example:
/tables
The navigation should have two links to tableA and tableB as tabs.
This is my solution so far.
Looks pretty cumbersome. Help me improve it.
For now I have to define each NavigationItem manually.
How could I improve that?
Can I somehow read the children from tables route and then autogenerate them?
I am using MUI. To match a tab I have to use the current location as the value.
Getting it from useChildMatches is the way I could figure. But getting it from the array seems to be wrong.
Why is it an array, and can it happen that the current path won't be on index 0?
Beta Was this translation helpful? Give feedback.
All reactions