react-menu-list
Advanced tools
Changelog
6.1.3 (2022-08-11)
Changelog
7.0.1 (2020-09-11)
renderButton
prop.Changelog
7.0.0 (2020-09-10)
ButtonComponent
prop was replaced with the renderButton
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}
/>
}
{/*...*/}
/>
);
Changelog
6.0.5 (2019-08-09)