diff --git a/packages/grafana-runtime/src/services/pluginExtensions/usePluginExtensions.ts b/packages/grafana-runtime/src/services/pluginExtensions/usePluginExtensions.ts index 801c1dcec0d..ff6bac57621 100644 --- a/packages/grafana-runtime/src/services/pluginExtensions/usePluginExtensions.ts +++ b/packages/grafana-runtime/src/services/pluginExtensions/usePluginExtensions.ts @@ -41,12 +41,14 @@ export function usePluginLinks(options: GetPluginExtensionsOptions): { export function usePluginComponents( options: GetPluginExtensionsOptions -): { components: Array>; isLoading: boolean } { +): { components: Array>; isLoading: boolean } { const { extensions, isLoading } = usePluginExtensions(options); return useMemo( () => ({ - components: extensions.filter(isPluginExtensionComponent) as Array>, + components: extensions + .filter(isPluginExtensionComponent) + .map(({ component }) => component as React.ComponentType), isLoading, }), [extensions, isLoading]