Release notes
π Features
- Allow disabling boundaries check
- Allow to disable preventDefault on key down
- Add support for hidden property to Separator
- Add visual feedback when the item is clicked
- Easy customization thanks to CSS variables. Check out the theme builder
- Keyboard shortcut made easy! A
keyMatcher
prop has been added to theItem
component. See it in action - Size decreased from 3.4K to 3.1K π
π· Bugfixes
- fix close animation flash #218 #219
- fix boundaries check when repositioning menu #163
- fix submenu offscreen #203
π₯ Breaking changes
- removal of
theme
andanimation
constants - The
show
method exposed by theuseContextMenu
hook uses the same signature ascontextMenu
. It only accepts a single parameter now.
const {show} = useContextMenu({id: "menuId"})
// βοΈ Before
show(e, {props: {}})
// β
Now
show({ event: e, props: {}})
- The
onShow
andonHidden
callback have been removed in favor of a single callbackonVisibilityChange
const handleVisibilityChange = (isVisible: boolean) => {
console.log(isVisible)
}
<Menu id="menuId" onVisibilityChange={handleVisibilityChange}>
<Item>Item 1</Item>
</Menu>
- Shorten path to import the stylesheet
// βοΈ Before
import "react-contexify/dist/ReactContexify.css"
// β
Now
import "react-contexify/ReactContexify.css"
-
Drop support for webpack 4 (CRA v4)
-
css classes have been renamed, please check how to style for the list