fix: header in EntityLayout should always be shown

Signed-off-by: Sandor Karpf <sandor.karpf@lastpass.com>
This commit is contained in:
Sandor Karpf
2026-01-11 13:01:07 +01:00
parent 6fc00e6804
commit 7ca91e827f
2 changed files with 15 additions and 10 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog': patch
---
Header in EntityLayout should always be shown.
Monitoring the loading status caused flickering when the refresh() method of the Async Entity was invoked.
@@ -102,21 +102,13 @@ export const EntityLayout = (props: EntityLayoutProps) => {
UNSTABLE_contextMenuOptions,
contextMenuItems,
children,
header,
NotFoundComponent,
parentEntityRelations,
} = props;
const { kind } = useRouteRefParams(entityRouteRef);
const { entity, loading, error } = useAsyncEntity();
const header = props.header ?? (
<EntityHeader
parentEntityRelations={parentEntityRelations}
UNSTABLE_contextMenuOptions={UNSTABLE_contextMenuOptions}
UNSTABLE_extraContextMenuItems={UNSTABLE_extraContextMenuItems}
contextMenuItems={contextMenuItems}
/>
);
const routes = useElementFilter(
children,
elements =>
@@ -150,7 +142,14 @@ export const EntityLayout = (props: EntityLayoutProps) => {
return (
<Page themeId={entity?.spec?.type?.toString() ?? 'home'}>
{!loading && header}
{header ?? (
<EntityHeader
parentEntityRelations={parentEntityRelations}
UNSTABLE_contextMenuOptions={UNSTABLE_contextMenuOptions}
UNSTABLE_extraContextMenuItems={UNSTABLE_extraContextMenuItems}
contextMenuItems={contextMenuItems}
/>
)}
{loading && <Progress />}