- Added
noMouseHighlight
prop to MenuItem to allow keyboard highlighting to be tracked separately from mouse hover.
- MenuList: "keydown" events are now listened for on the MenuList's own div, fixing issues where an ancestor React element could handle the "keydown" event before MenuList does.
- MenuButton: Enter and space "keydown" events on the button element that toggle it now have
stopPropagation()
called so that no other components attempt to handle the event redundantly. - MenuButton: The third argument of the
renderButton
prop callback is nowonKeyDown
, meant to be used as a keydown event handler instead of a keypress event handler. It will still work as a keypress event handler as previously recommended, so this isn't a breaking change.
- Fixed issue where MenuButton closes its dropdown if the page loses and regains focus.
- Fixed issue where MenuButton closes its dropdown if the page loses and regains focus.
- Fixed issue #35.
- Fixed issue #35.
- Batch React updates during all event handling.
- Batch React updates during all event handling.
- Use correct types for events in the Typescript definition of MenuButton's
renderButton
prop.
- Breaking change: MenuButton's
ButtonComponent
prop was replaced with therenderButton
prop. This change makes it easier to pass values down from a closure to the button element, and avoids a common mistake with the old API where a user may pass a fresh component on every render, causing React to mount a new component instance on every render.
Affected old code example:
return (
<MenuButton
ButtonComponent={MyButtonComponent}
{/*...*/}
/>
);
New code example:
return (
<MenuButton
renderButton={(domRef, opened, onKeyDown, onMouseDown) =>
<MyButtonComponent
domRef={domRef}
onKeyDown={onKeyDown}
onMouseDown={onMouseDown}
/>
}
{/*...*/}
/>
);
- Fixed a bug where if the user opened a MenuButton and then released the click over the MenuButton's dropdown (which would always happen if the MenuButton had position: 'cover' passed in the positionOptions prop), the MenuButton would close the dropdown.
- Fixed compatibility with Flow v0.100.
- Fixed compatibility with Flow v0.96.
- Updated TypeScript and Flow type definitions to expose MenuEvent and ChosenEvent types.
- Fixed compatibility with Flow v0.87.
- Fixed an error being logged when a user moved the mouse off of a SubMenuItem quickly before the menu opened.
- react-menu-list now requires React v16.6.0 or above.
- The component passed to the optional MenuButton prop
ButtonComponent
must support adomRef
prop which is passed as a ref to the button's DOM element. - The
open
method of MenuButton and SubMenuItem no longer takes a callback as a parameter. It returns a Promise now instead.
- No longer uses any deprecated APIs (legacy Context API, lifecycle methods, and ReactDOM.findDOMNode).
- Added TypeScript type definitions.
- Fix compatibility with Flow v0.72.
- SubMenuItem no longer has an inner div element wrapping its children. This change allows it to be styled consistently with MenuItem. This change may break existing users that had CSS depending on the inner element. (If you had a CSS selector that mentioned a class name put onto a SubMenuItem followed by "> div", then this means you! If you didn't, then you probably aren't affected by this change.)
- Fixed AutoComplete example not responding to mouse clicks correctly.
- react-menu-list now requires React v16.
- Use cross-env utility so that example can be built on Windows.
- Now compatible with Flow v0.53.
- No longer uses now-deprecated
React.PropTypes
. Uses prop-types package now.
- Added an optional callback parameter to MenuButton and SubMenuItem's open method.
- Now compatible with Flow v0.41.
- Improved the documentation of MenuItem and MenuButton.
- Fix bug where changes to index prop weren't respected.
- Now compatible with Flow v0.30.
- Added ButtonComponent prop to MenuButton.
- Now auto-closes MenuButton's menu when an outside element gets focused.
- react-menu-list now requires React v15.
- Fix issue where MenuButton closed when its contents were focused.
- Added hasHighlight method to several components.
- Added more MenuItem methods to SubMenuItem.
- Fixed issue where MenuList would still block the event of a user pressing Enter when no menu items were focused.
- Improved AutoComplete example with demonstrations of alternate behavior styles.
- Fixed exceptions emitted when a MenuList had no items.
- The zIndex prop on MenuItem and SubMenuItem was renamed to menuZIndex.
- MenuButton no longer opens when right-clicked.
- Added reposition method to MenuButton and SubMenuItem.
- Fixed focus outline appearing on MenuButton when opened with enter button in Chrome.
- Fixed MenuButton not closing in Safari and Firefox on OS X.
- MenuButton now opens on mousedown.
- Added zIndex, openedStyle, and openedClassName props to MenuButton and SubMenuItem.
- Improved MenuButton documentation.
- Now lists React v15 as an acceptable peer dependency.
- Added disabled and title props to MenuButton.
- Change MenuButton to be type="button" rather than type="submit" so that browsers don't believe it submits forms.
- Provide direction property in onHighlightChange event.
- Make MenuListInspector's moveCursor method return false instead of throwing an exception when no child menu list is found. Arguably this is an API-breaking change, but we're not bumping the major version number here because of the current unlikelihood that any users are depending on this now.
- Add a small delay before a submenu opens when the user hovers over a SubMenuItem. This makes SubMenuItem's behavior more consistent with OS X dropdown menus, and seems to make the submenu's appearance seem less jarring to the user.
- First stable release version.