fix: prevent parent menu items from navigating, only toggle submenu
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
This commit is contained in:
parent
14bc16ea01
commit
83a7b56945
@ -104,9 +104,11 @@ export default function AdminLayout() {
|
||||
const items = filterMenuByRole(adminMenuItems, currentRole)
|
||||
return items
|
||||
}}
|
||||
menuItemRender={(item, dom) => (
|
||||
<a onClick={() => item.path && navigate(item.path)}>{dom}</a>
|
||||
)}
|
||||
menuItemRender={(item, dom) => {
|
||||
// Parent items with children should only toggle, not navigate
|
||||
if ((item as any).children?.length) return dom
|
||||
return <a onClick={() => item.path && navigate(item.path)}>{dom}</a>
|
||||
}}
|
||||
breadcrumbRender={(routers) => {
|
||||
// Hide breadcrumbs for full-screen iframe pages
|
||||
if (location.pathname === '/git') return []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user