fix: use child menu title for work tabs
This commit is contained in:
@@ -76,16 +76,16 @@ const findMenuTrail = (
|
|||||||
? [...parents, { key: menuKey, title: menu.name }]
|
? [...parents, { key: menuKey, title: menu.name }]
|
||||||
: parents;
|
: parents;
|
||||||
|
|
||||||
if (isMenuPathMatch(menu.path, pathname)) {
|
|
||||||
return currentTrail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (menu.children?.length) {
|
if (menu.children?.length) {
|
||||||
const childTrail = findMenuTrail(menu.children, pathname, currentTrail);
|
const childTrail = findMenuTrail(menu.children, pathname, currentTrail);
|
||||||
if (childTrail.length) {
|
if (childTrail.length) {
|
||||||
return childTrail;
|
return childTrail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMenuPathMatch(menu.path, pathname)) {
|
||||||
|
return currentTrail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in New Issue
Block a user