Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript issue when overriding breadcrumbs label #194

Closed
konradsienkowski opened this issue Feb 29, 2024 · 1 comment
Closed

Typescript issue when overriding breadcrumbs label #194

konradsienkowski opened this issue Feb 29, 2024 · 1 comment

Comments

@konradsienkowski
Copy link

Describe the bug

Hey,
when using useBreadcrumbsItems composable, I'd like to override only the label of the last item & keep the default URL.

const breadcrumbs = useBreadcrumbItems({
  overrides: [
    undefined,
    undefined,
    {
      label: 'Some custom label',
    },
  ],
});

Such configuration works as expected in the app, although it raises a TypeScript error:

Type '{ label: string; }' is not assignable to type 'false | BreadcrumbItemProps | undefined'.
Property 'to' is missing in type '{ label: string; }' but required in type 'BreadcrumbItemProps'.

Reproduction

No response

System / Nuxt Info

------------------------------
- Operating System: Windows_NT
- Node Version:     v18.15.0
- Nuxt Version:     3.10.3
- CLI Version:      3.10.1
- Nitro Version:    2.8.1
- Package Manager:  npm@8.19.1
- Builder:          -
- User Config:      app, algolia, bugsnag, colorMode, devtools, future, googleFonts, fontMetrics, gtag, image, modules, ogImage, site, sitemap, schemaOrg, strapi, security, router, runtimeConfig, nitro
- Runtime Modules:  nuxt-icon@0.6.8, nuxt-viewport@2.1.4, nuxt-security@1.2.0, nuxt-gtag@1.2.1, nuxt-bugsnag@7.2.3, @pinia/nuxt@0.5.1, @nuxtjs/tailwindcss@6.11.4, @nuxtjs/color-mode@3.3.2, @nuxtjs/google-fonts@3.1.3, @nuxtjs/algolia@1.10.1, @nuxtjs/strapi@1.11.0, @vueuse/nuxt@10.8.0, @nuxt/image@1.2.0, @nuxtjs/seo@2.0.0-rc.8, @nuxtjs/fontaine@0.4.1
- Build Modules:    -
------------------------------
@harlan-zw
Copy link
Owner

harlan-zw commented Mar 11, 2024

Thanks, have pushed up a fix in 2.0.0-rc.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants