Merge pull request #1853 from RafaelTaranto/fix/id-routing
LAM-1422 fix: show subheader on refresh
This commit is contained in:
commit
8c77a52a31
1 changed files with 1 additions and 2 deletions
|
|
@ -33,9 +33,8 @@ const Link = ({
|
||||||
}) => {
|
}) => {
|
||||||
const [location] = useLocation()
|
const [location] = useLocation()
|
||||||
const [isActive] = useRoute(props.to)
|
const [isActive] = useRoute(props.to)
|
||||||
if (isActive) setActive(item)
|
|
||||||
|
|
||||||
const isParentActive = isParent && location.startsWith(props.to)
|
const isParentActive = isParent && location.startsWith(props.to)
|
||||||
|
if (isActive || isParentActive) setActive(item)
|
||||||
|
|
||||||
const classNames = classnames({
|
const classNames = classnames({
|
||||||
[className]: true,
|
[className]: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue