From b2f3e57b7262ef743bd33bfdbfe7a8193a5b044c Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 7 Nov 2024 08:19:51 -0700 Subject: [PATCH] fix Canvas can not render Map with query or filter in 8.15 --- .../public/dashboard_actions/filters_notification_action.tsx | 2 +- .../public/dashboard_actions/filters_notification_popover.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx b/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx index 9a5d5377acba3..96eba482dfbb0 100644 --- a/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx @@ -35,7 +35,7 @@ export const BADGE_FILTERS_NOTIFICATION = 'ACTION_FILTERS_NOTIFICATION'; export type FiltersNotificationActionApi = HasUniqueId & CanAccessViewMode & Partial & - HasParentApi; + HasParentApi>; const isApiCompatible = (api: unknown | null): api is FiltersNotificationActionApi => Boolean( diff --git a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx index 5f368d12a6d3e..665c62f0511fd 100644 --- a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx @@ -56,7 +56,7 @@ export function FiltersNotificationPopover({ api }: { api: FiltersNotificationAc } }, [api, setDisableEditButton]); - const dataViews = useMemo(() => api.parentApi?.getAllDataViews(), [api]); + const dataViews = useMemo(() => api.parentApi?.getAllDataViews?.() ?? [], [api]); return (