themesberg / flowbite-vue

Official Vue 3 components built for Flowbite and Tailwind CSS
https://flowbite-vue.com
MIT License
723 stars 116 forks source link

FwbSideBarItem cannot be used with named route #298

Open zoltanka opened 1 month ago

zoltanka commented 1 month ago

In case when one has nested pages like: /tool, and /tool/foo in the route definition we have the following:

const routes: RouteRecordRaw[] = [
    {
        component: ...,
        name: 'rool-route',
        path: '/tool',
        children: [
            name: 'tool-foo-name'
            path: 'foo',
            component: ...,
        ]
    }
]

Note that in the children, the path are always relative to their parent component's path.

If one would like to use named routes, the prop of the <RouterLink> expected the following type: { name: string }. So it must be used like:

<RouterLink to:"{ name: 'tool-foo-name' }">
zoltanka commented 3 weeks ago

I have created a PR to solve this. That is of course a very ridumentary solution. Only if there is interest in accepting this feature, then I'll put more time into it. Can I get maybe some attention on this?