Skip to content

Commit

Permalink
fix(nested): prevent parent node activate firing for singleLeaf (#20951)
Browse files Browse the repository at this point in the history
fixes #20946

Co-authored-by: Kael <kaelwd@gmail.com>
  • Loading branch information
yuwu9145 and KaelWD authored Feb 14, 2025
1 parent 812af2e commit ea70e18
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/vuetify/src/composables/nested/nested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,22 @@ export const useNested = (props: NestedProps) => {
event,
})

newActivated && (activated.value = newActivated)
if (newActivated.size !== activated.value.size) {
activated.value = newActivated
} else {
for (const value of newActivated) {
if (!activated.value.has(value)) {
activated.value = newActivated
return
}
}
for (const value of activated.value) {
if (!newActivated.has(value)) {
activated.value = newActivated
return
}
}
}
},
children,
parents,
Expand Down

0 comments on commit ea70e18

Please sign in to comment.