diff --git a/public/app/features/dashboard-scene/scene/new-toolbar/RightActions.tsx b/public/app/features/dashboard-scene/scene/new-toolbar/RightActions.tsx index cb4a43334ef..721c3396a28 100644 --- a/public/app/features/dashboard-scene/scene/new-toolbar/RightActions.tsx +++ b/public/app/features/dashboard-scene/scene/new-toolbar/RightActions.tsx @@ -169,13 +169,14 @@ function UndoButton({ dashboard }: ToolbarActionProps) { const editPane = dashboard.state.editPane; const { undoStack } = editPane.useState(); const undoAction = undoStack[undoStack.length - 1]; + const tooltip = undoAction ? `Undo '${undoAction.description}'` : 'Undo'; return ( editPane.undoAction()} - tooltip={undoAction?.description} + tooltip={tooltip} /> ); } @@ -184,12 +185,13 @@ function RedoButton({ dashboard }: ToolbarActionProps) { const editPane = dashboard.state.editPane; const { redoStack } = editPane.useState(); const redoAction = redoStack[redoStack.length - 1]; + const tooltip = redoAction ? `Redo '${redoAction?.description}'` : 'Redo'; return ( editPane.redoAction()} /> );