From 6947e276d6caea49143248c9891ef97af88d119c Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Thu, 15 Sep 2022 22:17:12 -0700 Subject: [PATCH] Inspect: Hide Actions tab when it is empty (#55272) --- public/app/features/dashboard/components/Inspector/hooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/dashboard/components/Inspector/hooks.ts b/public/app/features/dashboard/components/Inspector/hooks.ts index 4931b418a55..d95da31d672 100644 --- a/public/app/features/dashboard/components/Inspector/hooks.ts +++ b/public/app/features/dashboard/components/Inspector/hooks.ts @@ -65,7 +65,7 @@ export const useInspectTabs = ( // This is a quick internal hack to allow custom actions in inspect // For 8.1, something like this should be exposed through grafana/runtime const supplier = (window as any).grafanaPanelInspectActionSupplier as PanelInspectActionSupplier; - if (supplier && supplier.getActions(panel)) { + if (supplier && supplier.getActions(panel)?.length) { tabs.push({ label: t({ id: 'dashboard.inspect.actions-tab', message: 'Actions' }), value: InspectTab.Actions,