diff --git a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx index 2b5f3bcfca2..d35eb19c33c 100644 --- a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx +++ b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx @@ -51,6 +51,29 @@ export function RowItemRenderer({ model }: SceneComponentProps) { return ; } + const titleElement = ( + + {!model.hasUniqueTitle() && ( + + + + )} + {title} + {isHeaderHidden && ( + + + + )} + + ); + return ( {(dragProvided, dragSnapshot) => ( @@ -110,31 +133,9 @@ export function RowItemRenderer({ model }: SceneComponentProps) { data-testid={selectors.components.DashboardRow.title(title!)} > - - {!model.hasUniqueTitle() && ( - - - - )} - {title} - {isHeaderHidden && ( - - - - )} - + {!isEditing && titleElement} + {isEditing && titleElement} {isDraggable && } )}