From a1e0e790ad176ae9a9b8dfcbc7780988e6c2c114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maren=20S=C3=BCwer?= Date: Thu, 27 Sep 2018 09:59:25 +0200 Subject: [PATCH] allow navlink to be active at other links --- .../packages/ui-components/src/navigation/NavLink.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scm-ui-components/packages/ui-components/src/navigation/NavLink.js b/scm-ui-components/packages/ui-components/src/navigation/NavLink.js index 3a90fd1fc6..1f12e65546 100644 --- a/scm-ui-components/packages/ui-components/src/navigation/NavLink.js +++ b/scm-ui-components/packages/ui-components/src/navigation/NavLink.js @@ -7,7 +7,8 @@ import { Route, Link } from "react-router-dom"; type Props = { to: string, label: string, - activeOnlyWhenExact?: boolean + activeOnlyWhenExact?: boolean, + otherLocation: (route: any) => boolean }; class NavLink extends React.Component { @@ -16,10 +17,10 @@ class NavLink extends React.Component { }; renderLink = (route: any) => { - const { to, label } = this.props; + const { to, label, otherLocation } = this.props; return (
  • - + {label}