aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-shared/src')
-rw-r--r--packages/react-shared/src/components/nested_sidebar_menu.tsx13
1 files changed, 1 insertions, 12 deletions
diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx
index f3ce5f5bf..85206569c 100644
--- a/packages/react-shared/src/components/nested_sidebar_menu.tsx
+++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx
@@ -14,7 +14,6 @@ export interface NestedSidebarMenuProps {
sectionNameToLinks: ObjectMap<ALink[]>;
sidebarHeader?: React.ReactNode;
shouldDisplaySectionHeaders?: boolean;
- onMenuItemClick?: () => void;
selectedVersion?: string;
versions?: string[];
onVersionSelected?: (semver: string) => void;
@@ -41,7 +40,6 @@ const styles: Styles = {
export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, NestedSidebarMenuState> {
public static defaultProps: Partial<NestedSidebarMenuProps> = {
shouldDisplaySectionHeaders: true,
- onMenuItemClick: _.noop.bind(_),
shouldReformatMenuItemNames: true,
};
public render(): React.ReactNode {
@@ -92,11 +90,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N
return (
<div key={`menuItem-${finalMenuItemName}`}>
<Link to={link.to} shouldOpenInNewTab={link.shouldOpenInNewTab}>
- <MenuItem
- style={menuItemStyles}
- innerDivStyle={menuItemInnerDivStyles}
- onClick={this._onMenuItemClick.bind(this)}
- >
+ <MenuItem style={menuItemStyles} innerDivStyle={menuItemInnerDivStyles}>
<span
style={{
textTransform: this.props.shouldReformatMenuItemNames ? 'capitalize' : 'none',
@@ -111,9 +105,4 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N
});
return menuItems;
}
- private _onMenuItemClick(): void {
- if (!_.isUndefined(this.props.onMenuItemClick)) {
- this.props.onMenuItemClick();
- }
- }
}