Repository navigation
v2.1.4 - Nested dropdowns finally run their actions
Patch release. One fix, but a sharp one: if you opened a dropdown from inside a popover, picking an item did nothing. Both layers just closed. Pull 2.1.4 and it works — no code changes on your side.
What changed
- Fixed: a menu opened from inside another popover — the kebab in an MTimelineBoard event popover, an MCalendarBoard day popover, a select inside a popconfirm — would close everything on click without running the item's handler. It rarely looked like a framework bug, because the menu appeared in the right place and reacted to the click; it just silently did nothing. Plenty of reason to go hunting through your own onSelect code first. It was ours.
- The cause: nested popovers render through a portal, so they are not children of the popover they belong to. The parent read a press inside the nested menu as a click on the outside world, closed itself, and took the menu down mid-click — after which the browser had nothing left to fire the click on.
- Every component built on MPopover benefits: MSelect, MAutocomplete, MDatePicker, MDateRangePicker, MTimePicker, MDropdownMenu, MPopconfirm, MDataTable, MCardGrid, MCalendarBoard, MTimelineBoard and MChatInput.
Action required for consumers
- None. No prop, type or export changed, and dismissing popovers by clicking the background behaves exactly as before. Anyone on
^2.1.0picks this up on the nextnpm install. - If you built a workaround for this — opening an edit modal straight from a row click to bypass a menu that "did nothing", or forcing a menu's position by hand — you can drop it now.
Where to look
- No docs page changed; this is behaviour inside the primitive.
- Source:
mineralui/src/components/primitives/MPopover/— the newpopoverStack.tsand the outside-click handler inMPopover.tsx. - Covered by the framework's first automated test, driving a real mousedown/mouseup/click sequence so this cannot regress unnoticed.
- Ships in both Basic (
@banzamel/mineralui) and Pro (@banzamel/mineralui-pro) — MPopover is shared surface.