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:
Benjamin Janssens
2026-04-07 14:27:12 +02:00
parent 38950237e3
commit 7e42c62038
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-app': patch
---
Fixed a regression that caused disabled nav items to appear in the navigation bar.
+6
View File
@@ -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 [];