Skip to content

Commit

Permalink
fix: filter part props
Browse files Browse the repository at this point in the history
  • Loading branch information
dujiaqi committed Mar 23, 2023
1 parent 71af4b1 commit 7ea4d72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ export interface MenuItemProps
class LegacyMenuItem extends React.Component<any> {
render() {
const { title, attribute, elementRef, ...restProps } = this.props;

const passedProps = omit(restProps, ['eventKey']);

// Here the props are eventually passed to the DOM element.
// React does not recognize non-standard attributes.
// Therefore, remove the props that is not used here.
// ref: https://github.com/ant-design/ant-design/issues/41395
const passedProps = omit(restProps, ['eventKey', 'popupClassName', 'popupOffset', 'onTitleClick']);
warning(
!attribute,
'`attribute` of Menu.Item is deprecated. Please pass attribute directly.',
Expand Down

0 comments on commit 7ea4d72

Please sign in to comment.