Releases: szhsin/react-menu
Releases · szhsin/react-menu
v2.1.0
v2.0.1
v2.0.0
Features
- Forward
ref
in every component (#205) - Control menu open and close transition separately with
transition
prop (#217) - Control if menu is mounted in DOM before opening or unmounted when closed with
initialMounted
andunmountOnClose
props (#217) - Add
containerProps
inMenu
andControlledMenu
(#221) - Add
itemProps
inSubMenu
(#220) className
applied to container element in menu components for easily working withstyled-components
(#220 #221)
Fix
- Submenu cannot show properly when parent menu has
overflow
(#234)
Breaking Changes
- Manage menu open and close transitions with a
state
prop; replaceanimation
withtransition
prop; removeisOpen
andisMounted
props inControlledMenu
; removekeepMounted
prop inMenu
andSubMenu
(#217) - Replace
keepMounted
parameter with an option object inuseMenuState
hook (#217) - Remove
debugging
prop (#218) - Rename
className
prop onMenu
,ControlledMenu
, andSubMenu
tomenuClassName
. (#220 #230) - Remove deprecated
onClick
event onMenu
andControlledMenu
(#222) - Add
stopPropagation
inonClick
event object for skipping subsequentonItemClick
event on menu (#224) - Rename
onChange
event toonMenuChange
in menu; toonRadioChange
inMenuRadioGroup
(#225) - Rename css class names
rc-menu-*
toszh-menu-*
(#226) - Extract sliding animation from
index.css
into a separateslide.css
(#227)
Migrating from v1.x ?
Please refer to this guide.
v1.11.0
v1.10.1
v1.10.0
- Add
MenuGroup
component: allow fix-positioned items in scrollable menu list. (#124) (#111) - Add
submenuOpenDelay
andsubmenuCloseDelay
props for customising submenu open and close delay. (#121) (#118) - Resolve menu detaching from anchor when menu and its anchor are in two different scrollable containers. (#119)
- Batch state updates in
scroll
andresize
events to reduce menu re-rendering. (#131)
v1.9.1
v1.9.0
- Feature: automatically discover bounding box based on
css overflow
value, thanks @bozdoz (#79, #81) - Feature: automatically reposition menu after its size has changed (with
ResizeObserver
) (#87) - Feature: add
reposition
andrepositionFlag
props for explicitly repositioning menu (#96, #102) - Fix: Improve messaging when containerRef is null (#103)