Skip to content
New issue

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

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

Already on GitHub? # to your account

refactor(VTreeview): avoid re-render by opened & respect openAll #20032

Merged
merged 5 commits into from
Jun 20, 2024

Conversation

yuwu9145
Copy link
Member

@yuwu9145 yuwu9145 commented Jun 20, 2024

Keep the fix for #19919
Add cy tests & fixes #20024
fixes #19997

Description

Markup:

<template>
  <v-treeview
    :items="items"
  />
</template>

<script>
  export default {
    computed: {
      items: () => {
        const GetChildren = id => {
          const nodes = []
          for (let i = 0; i < 100; i++) {
            nodes.push({
              id: `${id}-${i}`,
              title: `Example child item ${i}`,
            })
          }
          return nodes
        }
        const nodes = []
        for (let i = 0; i < 2; i++) {
          nodes.push({
            id: i,
            title: `Example item ${i}`,
            children: GetChildren(i),
          })
        }
        return nodes
      },
    },
    methods: {
openedUpdate: function(e) {
  this.opened = e;
  console.log('openedUpdate', e)
}
    },
    data: () => ({
      opened: [],
    }),
  }
</script>

@yuwu9145 yuwu9145 changed the title Refactore(VTreeview): avoid internal re-render by opened mutation & respect openAll Refactore(VTreeview): avoid re-render by opened & respect openAll Jun 20, 2024
@yuwu9145 yuwu9145 changed the title Refactore(VTreeview): avoid re-render by opened & respect openAll refactor(VTreeview): avoid re-render by opened & respect openAll Jun 20, 2024
@yuwu9145 yuwu9145 marked this pull request as ready for review June 20, 2024 03:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
1 participant