Skip to content

Commit

Permalink
Fix collapsible item
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyomair committed Jul 18, 2019
1 parent 5a4d117 commit 09ab90c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/react-admin-mui/src/menu/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ export interface IMenuItemProps extends IMenuLevel {

type MuiListItemProps = Pick<ListItemProps, Exclude<keyof ListItemProps, "innerRef" | "button">> & { component?: React.ElementType };

export const MenuItem: React.FunctionComponent<IMenuItemProps & MuiListItemProps> = ({
text,
icon,
level,
secondaryAction,
onClick,
...otherProps
}) => {
export const MenuItem: React.FunctionComponent<IMenuItemProps & MuiListItemProps> = ({ text, icon, level, secondaryAction, ...otherProps }) => {
const context = React.useContext(MenuContext);
if (!context) throw new Error("Could not find context for menu");
const hasIcon = !!icon;
Expand Down

0 comments on commit 09ab90c

Please sign in to comment.