From 11869122b4fe00c834347f9911985d7b2572bc9b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 1 Aug 2018 17:33:28 +0200 Subject: Update React-scroll, getting rid of the need to manually set the url hash --- packages/react-shared/package.json | 4 ++-- packages/react-shared/src/components/anchor_title.tsx | 2 +- .../react-shared/src/components/nested_sidebar_menu.tsx | 17 +++-------------- 3 files changed, 6 insertions(+), 17 deletions(-) (limited to 'packages/react-shared') diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 6b4501e83..9f4cfd624 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -39,7 +39,7 @@ "@types/node": "^8.0.53", "@types/react": "*", "@types/react-dom": "*", - "@types/react-scroll": "0.0.31", + "@types/react-scroll": "1.5.3", "basscss": "^8.0.3", "is-mobile": "^0.2.2", "lodash": "^4.17.4", @@ -48,7 +48,7 @@ "react-dom": "15.6.1", "react-highlight": "0xproject/react-highlight", "react-markdown": "^3.2.2", - "react-scroll": "^1.5.2", + "react-scroll": "^1.7.10", "react-tap-event-plugin": "^2.0.1" }, "publishConfig": { diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index 473b994bf..451ba1729 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -69,13 +69,13 @@ export class AnchorTitle extends React.Component - + {finalMenuItemName} @@ -128,12 +125,11 @@ export class NestedSidebarMenu extends React.Component ); } - private _onMenuItemClick(name: string): void { - const id = utils.getIdFromName(name); - utils.setUrlHash(id); - if (!_.isUndefined(this.props.onMenuItemClick)) { - this.props.onMenuItemClick(); - } - } } -- cgit v1.2.3