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(VTreeview): activated emits twice on leafs #20739

Merged
merged 1 commit into from
Nov 29, 2024
Merged

fix(VTreeview): activated emits twice on leafs #20739

merged 1 commit into from
Nov 29, 2024

Conversation

yuwu9145
Copy link
Member

fixes #20665

Description

Markup:

<template>
  <v-treeview
    :items="items"
    color="warning"
    activatable
    item-value="id"
    open-all
    @update:activated="id => console.log('update:activated is called with '+id)"
  ></v-treeview>
</template>

<script>
  export default {
    data: () => ({
      items: [
        {
          id: 1,
          title: 'Applications :',
          children: [
            { id: 2, title: 'Calendar : app' },
            { id: 3, title: 'Chrome : app' },
            { id: 4, title: 'Webstorm : app' },
          ],
        },
        {
          id: 5,
          title: 'Documents :',
          children: [
            {
              id: 6,
              title: 'vuetify :',
              children: [
                {
                  id: 7,
                  title: 'src :',
                  children: [
                    { id: 8, title: 'index : ts' },
                    { id: 9, title: 'bootstrap : ts' },
                  ],
                },
              ],
            },
            {
              id: 10,
              title: 'material2 :',
              children: [
                {
                  id: 11,
                  title: 'src :',
                  children: [
                    { id: 12, title: 'v-btn : ts' },
                    { id: 13, title: 'v-card : ts' },
                    { id: 14, title: 'v-window : ts' },
                  ],
                },
              ],
            },
          ],
        },
        {
          id: 15,
          title: 'Downloads :',
          children: [
            { id: 16, title: 'October : pdf' },
            { id: 17, title: 'November : pdf' },
            { id: 18, title: 'Tutorial : html' },
          ],
        },
        {
          id: 19,
          title: 'Videos :',
          children: [
            {
              id: 20,
              title: 'Tutorials :',
              children: [
                { id: 21, title: 'Basic layouts : mp4' },
                { id: 22, title: 'Advanced techniques : mp4' },
                { id: 23, title: 'All about app : dir' },
              ],
            },
            { id: 24, title: 'Intro : mov' },
            { id: 25, title: 'Conference introduction : avi' },
          ],
        },
      ],
    }),
  }
</script>

@yuwu9145 yuwu9145 marked this pull request as ready for review November 28, 2024 00:44
@yuwu9145 yuwu9145 changed the title fix(VTreeview): activated emit twice on leafs fix(VTreeview): activated emits twice on leafs Nov 29, 2024
@yuwu9145 yuwu9145 merged commit 0fb92ed into master Nov 29, 2024
19 checks passed
@yuwu9145 yuwu9145 deleted the fix-20665 branch November 29, 2024 06:14
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

Successfully merging this pull request may close these issues.

[Bug Report][3.7.3][VTreeview] update:activated is fired twice on leafs
1 participant