mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
fixed missing default value for activeOnlyWhenExact on NavLink
This commit is contained in:
@@ -26,8 +26,7 @@ import classNames from "classnames";
|
|||||||
import { Link, useRouteMatch } from "react-router-dom";
|
import { Link, useRouteMatch } from "react-router-dom";
|
||||||
import { RoutingProps } from "./RoutingProps";
|
import { RoutingProps } from "./RoutingProps";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { useContext } from "react";
|
import useMenuContext from "./MenuContext";
|
||||||
import useMenuContext, { MenuContext } from "./MenuContext";
|
|
||||||
|
|
||||||
type Props = RoutingProps & {
|
type Props = RoutingProps & {
|
||||||
label: string;
|
label: string;
|
||||||
@@ -63,4 +62,8 @@ const NavLink: FC<Props> = ({ to, activeOnlyWhenExact, icon, label, title }) =>
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NavLink.defaultProps = {
|
||||||
|
activeOnlyWhenExact: true
|
||||||
|
};
|
||||||
|
|
||||||
export default NavLink;
|
export default NavLink;
|
||||||
|
|||||||
Reference in New Issue
Block a user