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

fix(VBreadcrumbs): fix types for slots #19341

Merged

Conversation

SonTT19
Copy link
Contributor

@SonTT19 SonTT19 commented Mar 6, 2024

Description

fixes #19339

Markup:

<template>
  <v-app>
    <v-container>
      <!-- proof that `title` exists on `item` -->
      <v-breadcrumbs :items="['foo', 'bar']">
        <template #item="{ item }">{{ item }}</template>
      </v-breadcrumbs>

      <!-- renders as expected but causes ts error -->
      <v-breadcrumbs :items="['foo', 'bar']">
        <template #item="{ item }">{{ item.title }}</template>
      </v-breadcrumbs>

      <!-- explicitly creating the item object fixes the error -->
      <v-breadcrumbs :items="['foo', 'bar'].map((entry) => { return { title: entry } })">
        <template #item="{ item }">{{ item.title }}</template>
      </v-breadcrumbs>
    </v-container>
  </v-app>
</template>

<script setup lang="ts">
  import { ref } from 'vue'

  const msg = ref('Hello World!')
</script>

@MajesticPotatoe MajesticPotatoe added T: bug Functionality that does not work as intended/expected C: VBreadcrumbs VBreadcrumbs labels Mar 12, 2024
@johnleider johnleider added this to the v3.5.x milestone Mar 15, 2024
@johnleider johnleider merged commit 756331e into vuetifyjs:master Mar 15, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VBreadcrumbs VBreadcrumbs T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.5.7] v-breadcrumbs typing broken
3 participants