From 6bf0d5674fb9cbd32abc36a3d5f6e804dab344ba Mon Sep 17 00:00:00 2001 From: Stefan Dobrev Date: Fri, 21 Oct 2016 15:49:26 +0300 Subject: [PATCH] [material-ui] ListItem and MenuItem props fixes `MenuItem` properties are passed to the underlying `ListItem` element. Remove the extending of `React.Props<>` because it is causing problems with multiple implementation of the `ref` property with different generic arguments. `React.Props<>` is deprecated nevertheless. The same applies to `ListItem` properties and its underlying `EnhancedButton`. --- material-ui/index.d.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/material-ui/index.d.ts b/material-ui/index.d.ts index a6ed3cff6b..aee74c1c0c 100644 --- a/material-ui/index.d.ts +++ b/material-ui/index.d.ts @@ -1063,7 +1063,7 @@ declare namespace __MaterialUI { export class List extends React.Component { } - interface ListItemProps extends React.HTMLAttributes<{}>, React.Props { + interface ListItemProps extends EnhancedButtonProps { // is the element that get the 'other' properties autoGenerateNestedIndicator?: boolean; disableKeyboardFocus?: boolean; @@ -1137,7 +1137,7 @@ declare namespace __MaterialUI { export class Menu extends React.Component{ } - interface MenuItemProps extends React.HTMLAttributes<{}>, React.Props { + interface MenuItemProps extends List.ListItemProps { // is the element that get the 'other' properties checked?: boolean; desktop?: boolean; @@ -1152,10 +1152,6 @@ declare namespace __MaterialUI { secondaryText?: React.ReactNode; style?: React.CSSProperties; value?: any; - - // useful attributes passed to - primaryText?: React.ReactNode; - secondaryTextLines?: number; // 1 or 2 } export class MenuItem extends React.Component{ }