diff --git a/web/src/context/Assets/BusterAssetsProvider.tsx b/web/src/context/Assets/BusterAssetsProvider.tsx index c7f5455dc..ca2c62ee8 100644 --- a/web/src/context/Assets/BusterAssetsProvider.tsx +++ b/web/src/context/Assets/BusterAssetsProvider.tsx @@ -30,7 +30,7 @@ const useBusterAssets = () => { }); } else if (type === 'dashboard') { await queryClient.invalidateQueries({ - queryKey: queryKeys.dashboardGetDashboard(assetId).queryKey + queryKey: queryKeys.dashboardGetDashboard(assetId, undefined).queryKey }); } else if (type === 'collection') { await queryClient.invalidateQueries({ diff --git a/web/src/context/Dashboards/useGetDashboardMemoized.tsx b/web/src/context/Dashboards/useGetDashboardMemoized.tsx index 4dffa5950..db8870af0 100644 --- a/web/src/context/Dashboards/useGetDashboardMemoized.tsx +++ b/web/src/context/Dashboards/useGetDashboardMemoized.tsx @@ -4,8 +4,8 @@ import { useQueryClient } from '@tanstack/react-query'; export const useGetDashboardMemoized = () => { const queryClient = useQueryClient(); - const getDashboardMemoized = useMemoizedFn((dashboardId: string) => { - const options = dashboardQueryKeys.dashboardGetDashboard(dashboardId); + const getDashboardMemoized = useMemoizedFn((dashboardId: string, versionNumber?: number) => { + const options = dashboardQueryKeys.dashboardGetDashboard(dashboardId, versionNumber); const data = queryClient.getQueryData(options.queryKey); return data; });