You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NavigationMenu: expanding a nested item in vertical orientation collapses its parent when using v-model #7215
Render the component: "Parent" is expanded and shows "Page" and "Nested".
Click "Nested".
Expected: "Nested" expands to show "Child", "Parent" stays expanded, and open stays ["Parent"].
Actual: open becomes ["Nested"], so the top-level accordion collapses "Parent" and the whole subtree disappears, including the "Nested" item that was just clicked.
Description
In a vertical UNavigationMenu with v-model, the nested accordion that renders an item's children emits its own open values through the menu's update:modelValue. The menu's modelValue describes only the top-level accordion (it is bound to the top-level AccordionRoot only), so any interaction with a nested section overwrites the top-level state.
This happens because accordionProps is created with the component's emits:
useForwardProps adds the onUpdate:modelValue listener to the returned object. Both the top-level AccordionRoot and the nested AccordionRoot inside AccordionContent spread ...accordionProps, so the nested root forwards its update:modelValue to the menu as well. The same code is on the current v4 branch.
Without v-model the issue is invisible, because nothing writes the emitted value back into the top-level accordion.
A possible fix is to not forward update:modelValue from nested accordions, for example by overriding the listener in the nested AccordionRoot binding, or by building a separate props object for nested roots without emits. We currently apply the first option as a local patch (below). With it, expanding a nested section keeps the parent open and v-model reflects only top-level sections.
Still reproduces on play.ui.nuxt.com (nuxt/ui v4.12.0, Chromium 151, 2026-10-21):
Open the playground linked in this issue on play.ui.nuxt.com — App.vue has a vertical UNavigationMenu with v-model, Parent is expanded by default showing Page and Nested.
In the preview pane, click Nested.
Parent collapses (children hidden, chevron down); v-model changes from ["Parent"] to ["Nested"] — expected ["Parent", "Nested"].
Activity
scenerecap commentedon Oct 22, 2026
Still reproduces on play.ui.nuxt.com (nuxt/ui v4.12.0, Chromium 151, 2026-10-21):
UNavigationMenuwithv-model,Parentis expanded by default showingPageandNested.Parentcollapses (children hidden, chevron down);v-modelchanges from["Parent"]to["Nested"]— expected["Parent", "Nested"].Recording with the v-model readout visible throughout: https://scenerecap.com/s/ou5ch6mw3t