fix(app): add check for disabled nav items to discovery of pages
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-app': patch
|
||||
---
|
||||
|
||||
Fixed a regression that caused disabled nav items to appear in the navigation bar.
|
||||
@@ -188,6 +188,12 @@ function NavContentRenderer(props: {
|
||||
return [];
|
||||
}
|
||||
|
||||
const navItemNodeId = node.spec.id.replace(/^page:/, 'nav-item:');
|
||||
const navItemNode = tree.nodes.get(navItemNodeId);
|
||||
if (navItemNode?.spec.disabled) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const routeRef = node.instance.getData(coreExtensionData.routeRef);
|
||||
if (!routeRef) {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user