I am using it in a project I am working on and noticed the following problem. I use disabled state of the items to mark the currently active MenuItem. It works well except for one thing. When I navigate via a Button that just uses the push method of react-router-redux through this.props.history, everything is rerendered correctly, but the MenuItem created by the NestedMenuItem inside the Menubar is not updated and still has disabled set to true for the last active item.
Code: Select all
<Button id="loginWithLabel"
label="LOG-IN"
icon="fa-sign-in"
onClick={() => { this.navigateTo('/login') }} />
navigateTo = (urlPart) => {
...
//navigate to internal URL
this.props.history.push(urlPart);
...
}
Is that expected behaviour or am I doing something unexpected or wrong?
The MenuItem causing the problem is created in NestedMenuItem.js from line 105:
Code: Select all
_react2.default.createElement(_MenuItem.MenuItem, { items: this.props.item, onItemClick: function onItemClick(event) {
return _this2.itemClick(event, _this2.props.item);
}, root: this.props.root, parentMenu: this.props.parentMenu })