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 [isActive] = useRoute(props.to)
|
||||
if (isActive) setActive(item)
|
||||
|
||||
const isParentActive = isParent && location.startsWith(props.to)
|
||||
if (isActive || isParentActive) setActive(item)
|
||||
|
||||
const classNames = classnames({
|
||||
[className]: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue