MenuItem: type of to
should be RouteLocationRaw
#1933
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
CodeSandbox Case (Bug Reports)
(TypeScript)
The
to
field on<router-link>
allows for more than just string paths, e.g. named routes.The type of the
to
field onMenuItem
currently does not allow this because it isstring
:Current behavior
The type is
string
, and does thus not allow having named routes as in the example above.Expected behavior
The type should be
RouteLocationRaw
, which aligns with the type of theto
field on<router-link>
: https://github.com/vuejs/vue-router-next/blob/master/src/RouterLink.ts#L45Minimal reproduction of the problem with instructions
See above
What is the motivation / use case for changing the behavior?
Improved TypeScript support for the MenuModel.
Please tell us about your environment:
Vue CLI with TypeScript
Vue version: 3.X
PrimeVue version: 3.10.0
Browser: all
The text was updated successfully, but these errors were encountered: