mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 17:29:45 +00:00
Clicking "Add node" in the flow builder crashed the whole page to a
"This page couldn't load" error boundary, in both the list and canvas
views.
The add-node menus render a DropdownMenuLabel per category. That is
base-ui's Menu.GroupLabel, which calls useMenuGroupRootContext() during
render and THROWS ("MenuGroupContext is missing") when it has no
Menu.Group ancestor. Both menus wrapped each category in a plain <div>
instead of a DropdownMenuGroup, so the label had no group context. The
menu content only mounts when the menu opens, which is why initial
render was fine and the crash fired exactly on click.
Wrap each category's label + items in DropdownMenuGroup (base-ui
Menu.Group), which provides the context Menu.GroupLabel needs. The
between-group separator moves into a keyed Fragment so it stays a
sibling of the groups.
Adds a regression test pinning the contract: a bare DropdownMenuLabel
throws, a group-wrapped one does not.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| accordion.tsx | ||
| alert.tsx | ||
| avatar.tsx | ||
| badge.tsx | ||
| button.tsx | ||
| card.tsx | ||
| checkbox.tsx | ||
| dialog.tsx | ||
| dropdown-menu-group-label.test.tsx | ||
| dropdown-menu.tsx | ||
| gated-button.tsx | ||
| input.tsx | ||
| label.tsx | ||
| popover.tsx | ||
| radio-group.tsx | ||
| scroll-area.tsx | ||
| select.tsx | ||
| separator.tsx | ||
| sheet.tsx | ||
| switch.tsx | ||
| table.tsx | ||
| tabs.tsx | ||
| textarea.tsx | ||
| tooltip.tsx | ||