Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
menuProps.onClick = this.handleClick;
menuProps.openTransitionName = menuOpenAnimation;
} else {
menuProps.openAnimation = menuOpenAnimation;
}
return _react2['default'].createElement(_rcMenu2['default'], (0, _extends3['default'])({}, this.props, menuProps));
}
}]);
return Menu;
}(_react2['default'].Component);
exports['default'] = Menu;
Menu.Divider = _rcMenu.Divider;
Menu.Item = _MenuItem2['default'];
Menu.SubMenu = _rcMenu.SubMenu;
Menu.ItemGroup = _rcMenu.ItemGroup;
Menu.defaultProps = {
prefixCls: 'ant-menu',
className: '',
theme: 'light'
};
Menu.childContextTypes = {
inlineCollapsed: _propTypes2['default'].bool
};
Menu.contextTypes = {
siderCollapsed: _propTypes2['default'].bool
};
module.exports = exports['default'];
return React.createElement(_MenuContext["default"].Consumer, null, function (_ref) {
var antdMenuTheme = _ref.antdMenuTheme;
return React.createElement(_rcMenu.SubMenu, _extends({}, _this2.props, {
ref: _this2.saveSubMenu,
popupClassName: (0, _classnames["default"])("".concat(rootPrefixCls, "-").concat(antdMenuTheme), popupClassName)
}));
});
}
return items.map(function (item) {
if (item.children && item.children.length > 0) {
var keyPathOfSelectedItem = _this2.state.keyPathOfSelectedItem;
var containSelected = Object.keys(keyPathOfSelectedItem).some(function (key) {
return keyPathOfSelectedItem[key].indexOf(item.value) >= 0;
});
var subMenuCls = containSelected ? _this2.props.dropdownPrefixCls + '-submenu-contain-selected' : '';
return _react2['default'].createElement(
_rcMenu.SubMenu,
{ title: item.text, className: subMenuCls, key: item.value.toString() },
_this2.renderMenus(item.children)
);
}
return _this2.renderMenuItem(item);
});
}
menuProps.onClick = this.handleClick;
menuProps.openTransitionName = menuOpenAnimation;
} else {
menuProps.openAnimation = menuOpenAnimation;
}
return _react2['default'].createElement(_rcMenu2['default'], (0, _extends3['default'])({}, this.props, menuProps));
}
}]);
return Menu;
}(_react2['default'].Component);
exports['default'] = Menu;
Menu.Divider = _rcMenu.Divider;
Menu.Item = _MenuItem2['default'];
Menu.SubMenu = _rcMenu.SubMenu;
Menu.ItemGroup = _rcMenu.ItemGroup;
Menu.defaultProps = {
prefixCls: 'ant-menu',
className: '',
theme: 'light'
};
Menu.childContextTypes = {
inlineCollapsed: _propTypes2['default'].bool
};
Menu.contextTypes = {
siderCollapsed: _propTypes2['default'].bool
};
module.exports = exports['default'];