Skip to content

Commit

Permalink
fix(menu): 修复menu dom报警
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanaMaid committed Aug 6, 2018
1 parent bd27ba7 commit 3b0d285
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ export class Menu extends Component<IMenuProps, IMenuState> {
className, style, children,
onSelect, defaultActiveKey,
onOpenChange, defaultOpenKeys,
offset,
offset, activeKey,
...otherProps} = this.props;
const preCls = 'yoshino-menu';
const clsName = classNames(
preCls, className,
);
const childrens = React.Children.toArray(children);
const activeKey = this.getActiveKey();
const activeKeyR = this.getActiveKey();
const openKeys = this.getOpenKeys();
return (
<ul
Expand All @@ -130,7 +130,7 @@ export class Menu extends Component<IMenuProps, IMenuState> {
React.Children.map(childrens, (child: ReactElement<any>) => {
return React.cloneElement(child, {
deep: 1,
activeKey,
activeKeyR,
openKeys,
onSelect: this.onSelect,
onOpenChange: this.onOpenChange,
Expand Down

0 comments on commit 3b0d285

Please sign in to comment.