Skip to content

Commit 236a13a

Browse files
committed
chore: Replace omit.js with rc-util omit
1 parent b5ba26c commit 236a13a

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@
4444
"@babel/runtime": "^7.10.1",
4545
"classnames": "2.x",
4646
"mini-store": "^3.0.1",
47-
"omit.js": "^2.0.0",
4847
"rc-motion": "^2.0.1",
4948
"rc-trigger": "^5.1.2",
50-
"rc-util": "^5.5.0",
49+
"rc-util": "^5.7.0",
5150
"resize-observer-polyfill": "^1.5.0",
5251
"shallowequal": "^1.1.0"
5352
},

src/Menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { Provider, create } from 'mini-store';
3-
import omit from 'omit.js';
3+
import omit from 'rc-util/lib/omit';
44
import { CSSMotionProps } from 'rc-motion';
55
import SubPopupMenu, { getActiveKey } from './SubPopupMenu';
66
import { noop } from './util';
@@ -427,7 +427,7 @@ class Menu extends React.Component<MenuProps, MenuState> {
427427

428428
return (
429429
<Provider store={this.store}>
430-
<SubPopupMenu {...props} ref={this.setInnerMenu}>
430+
<SubPopupMenu {...props as any} ref={this.setInnerMenu}>
431431
{this.props.children}
432432
</SubPopupMenu>
433433
</Provider>

src/MenuItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import KeyCode from 'rc-util/lib/KeyCode';
33
import classNames from 'classnames';
4-
import omit from 'omit.js';
4+
import omit from 'rc-util/lib/omit';
55
import { connect } from 'mini-store';
66
import { noop, menuAllProps } from './util';
77
import {

src/SubMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export class SubMenu extends React.Component<SubMenuProps, SubMenuState> {
440440
onClick: this.onSubMenuClick,
441441
onSelect: this.onSelect,
442442
onDeselect: this.onDeselect,
443-
onDestroy: this.onDestroy,
443+
onDestroy: this.onDestroy as any,
444444
selectedKeys: props.selectedKeys,
445445
eventKey: `${props.eventKey}-menu-`,
446446
openKeys: props.openKeys,
@@ -458,7 +458,7 @@ export class SubMenu extends React.Component<SubMenuProps, SubMenuState> {
458458
multiple: props.multiple,
459459
prefixCls: props.rootPrefixCls,
460460
id: this.internalMenuId,
461-
manualRef: this.saveMenuInstance,
461+
manualRef: this.saveMenuInstance as any,
462462
itemIcon: props.itemIcon,
463463
expandIcon: props.expandIcon,
464464
direction: props.direction,

0 commit comments

Comments
 (0)