diff --git a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx index 2d182e31fc754..f7f8ffaf46e01 100644 --- a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx +++ b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx @@ -32,6 +32,7 @@ import { RootState } from 'src/dashboard/types'; import { useSelector } from 'react-redux'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { last } from 'lodash'; +import { getDashboardUrlParams } from 'src/utils/urlUtils'; import { DownloadScreenshotFormat } from './types'; const RETRY_INTERVAL = 3000; @@ -127,6 +128,7 @@ export default function DownloadScreenshot({ anchor, activeTabs, dataMask, + urlParams: getDashboardUrlParams(), }, }) .then(({ json }) => { diff --git a/superset-frontend/src/utils/urlUtils.ts b/superset-frontend/src/utils/urlUtils.ts index 2858d65a7de1c..49fab2dd1f109 100644 --- a/superset-frontend/src/utils/urlUtils.ts +++ b/superset-frontend/src/utils/urlUtils.ts @@ -123,7 +123,7 @@ function getChartUrlParams(excludedUrlParams?: string[]): UrlParamEntries { return getUrlParamEntries(urlParams); } -function getDashboardUrlParams(): UrlParamEntries { +export function getDashboardUrlParams(): UrlParamEntries { const urlParams = getUrlParams(RESERVED_DASHBOARD_URL_PARAMS); const filterBoxFilters = getActiveFilters(); if (!isEmpty(filterBoxFilters))