diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-03-24 02:18:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-24 02:18:31 +0800 |
commit | f30353087f9c4ec4fa5e096a065c9749e1164984 (patch) | |
tree | 4d7968160890b5efa358593e743411c7b8652556 /packages/react-shared/src/components/nested_sidebar_menu.tsx | |
parent | 7ef6bd4b14b7502617c6929010d4a9991e1d577d (diff) | |
parent | bed7d87b7ff64989051e6b2115a1c77e1e72ff55 (diff) | |
download | dexon-sol-tools-f30353087f9c4ec4fa5e096a065c9749e1164984.tar dexon-sol-tools-f30353087f9c4ec4fa5e096a065c9749e1164984.tar.gz dexon-sol-tools-f30353087f9c4ec4fa5e096a065c9749e1164984.tar.bz2 dexon-sol-tools-f30353087f9c4ec4fa5e096a065c9749e1164984.tar.lz dexon-sol-tools-f30353087f9c4ec4fa5e096a065c9749e1164984.tar.xz dexon-sol-tools-f30353087f9c4ec4fa5e096a065c9749e1164984.tar.zst dexon-sol-tools-f30353087f9c4ec4fa5e096a065c9749e1164984.zip |
Merge branch 'development' into feature/deployer-improvements
Diffstat (limited to 'packages/react-shared/src/components/nested_sidebar_menu.tsx')
-rw-r--r-- | packages/react-shared/src/components/nested_sidebar_menu.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 2225bd197..f49d6fcf7 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -45,7 +45,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N }; public render() { const navigation = _.map(this.props.topLevelMenu, (menuItems: string[], sectionName: string) => { - const finalSectionName = sectionName.replace(/-/g, ' '); + const finalSectionName = utils.convertDashesToSpaces(sectionName); if (this.props.shouldDisplaySectionHeaders) { const id = utils.getIdFromName(sectionName); return ( @@ -85,6 +85,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N : styles.menuItemWithoutHeaders; const menuItemInnerDivStyles = this.props.shouldDisplaySectionHeaders ? styles.menuItemInnerDivWithHeaders : {}; const menuItems = _.map(menuItemNames, menuItemName => { + const finalMenuItemName = utils.convertDashesToSpaces(menuItemName); const id = utils.getIdFromName(menuItemName); return ( <div key={menuItemName}> @@ -96,11 +97,11 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N containerId={constants.DOCS_CONTAINER_ID} > <MenuItem - onTouchTap={this._onMenuItemClick.bind(this, menuItemName)} + onTouchTap={this._onMenuItemClick.bind(this, finalMenuItemName)} style={menuItemStyles} innerDivStyle={menuItemInnerDivStyles} > - <span style={{ textTransform: 'capitalize' }}>{menuItemName}</span> + <span style={{ textTransform: 'capitalize' }}>{finalMenuItemName}</span> </MenuItem> </ScrollLink> {this._renderMenuItemSubsections(menuItemName)} @@ -122,7 +123,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N const name = `${menuItemName}-${entityName}`; const id = utils.getIdFromName(name); return ( - <li key={`menuItem-${entityName}`}> + <li key={`menuSubsectionItem-${name}`}> <ScrollLink to={id} offset={0} |