Most changes in this version are improvements and bug fixes behind the scenes – however there are a few new APIs:
- Introduced the
onItemSelect
property ((index: number) => void
) to theMenu
component props, to make it possible to subscribe to whichMenuButton
is currently selected. - The
MenuItem
now takes theselected
property (boolean
) to indicate which item in aMenu
should be selected by default. - The
MenuButton
component now takes thepopover
property (PopoverProps
), which is an object containing properties for thePopover
component (likearrow
,preventOverflow
,portal
, and so on). - The
Popover
component now takes amatchReferenceWidth
property (boolean
) to render the popover with same width as the referred element.