Skip to content

Releases: szhsin/react-menu

v2.1.0

26 Sep 07:27
ae81ee0
Compare
Choose a tag to compare
  • Open or close Menu and SubMenu programmatically with instanceRef (#277)
  • Set type to "button" in MenuButton (#278)

v2.0.1

05 Sep 10:36
6a4a4af
Compare
Choose a tag to compare

Menu allows any valid jsx in children prop (#251)

v2.0.0

21 Aug 04:37
059aced
Compare
Choose a tag to compare

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 and unmountOnClose props (#217)
  • Add containerProps in Menu and ControlledMenu (#221)
  • Add itemProps in SubMenu (#220)
  • className applied to container element in menu components for easily working with styled-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; replace animation with transition prop; remove isOpen and isMounted props in ControlledMenu; remove keepMounted prop in Menu and SubMenu (#217)
  • Replace keepMounted parameter with an option object in useMenuState hook (#217)
  • Remove debugging prop (#218)
  • Rename className prop on Menu, ControlledMenu, and SubMenu to menuClassName. (#220 #230)
  • Remove deprecated onClick event on Menu and ControlledMenu (#222)
  • Add stopPropagation in onClick event object for skipping subsequent onItemClick event on menu (#224)
  • Rename onChange event to onMenuChange in menu; to onRadioChange in MenuRadioGroup (#225)
  • Rename css class names rc-menu-* to szh-menu-* (#226)
  • Extract sliding animation from index.css into a separate slide.css (#227)

Migrating from v1.x ?

Please refer to this guide.

v1.11.0

24 Jul 05:22
7548644
Compare
Choose a tag to compare
  • Add onItemClick in menu components; deprecate onClick (#198)
  • Optimise render props with memorisation (#203)

v1.10.1

05 Jun 04:58
3671d1b
Compare
Choose a tag to compare
  • Fix type definition error: allow MenuItem.onClick to return Promise<void>, thanks @dstawinski (#159)
  • Move prop-types from peerDependencies into dependencies (#160)

v1.10.0

01 May 05:31
539bfe2
Compare
Choose a tag to compare
  • Add MenuGroup component: allow fix-positioned items in scrollable menu list. (#124) (#111)
  • Add submenuOpenDelay and submenuCloseDelay 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 and resize events to reduce menu re-rendering. (#131)

v1.9.1

12 Apr 11:41
c4a4b03
Compare
Choose a tag to compare
  • Fix submenu flicking when it's open and anchor item is clicked (#107)
  • Fix process is not defined in Webpack 5, thanks @gcangussu (#117)

v1.9.0

28 Mar 11:28
e8caed0
Compare
Choose a tag to compare
  • 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 and repositionFlag props for explicitly repositioning menu (#96, #102)
  • Fix: Improve messaging when containerRef is null (#103)

v1.8.0

09 Mar 13:11
206c569
Compare
Choose a tag to compare
  • Feature: add core.css which includes only essential styles that make menu functional (positioning, arrow display) (#73).
  • Feature: add theming support and theme-dark.css (#78).

v1.7.0

24 Feb 11:51
50ace31
Compare
Choose a tag to compare

Feature: add boundingBoxRef and boundingBoxPadding prop to support positioning menu within a specific container. (#69)