diff --git a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx index 17ec6ee8d..e70a634c4 100644 --- a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx +++ b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx @@ -156,7 +156,7 @@ export default function DownloadScreenshot({ anchor, activeTabs, dataMask, - urlParams: getDashboardUrlParams(), + urlParams: getDashboardUrlParams(['edit']), }, }) .then(({ json }) => { diff --git a/superset-frontend/src/utils/urlUtils.ts b/superset-frontend/src/utils/urlUtils.ts index 49fab2dd1..80e8948d2 100644 --- a/superset-frontend/src/utils/urlUtils.ts +++ b/superset-frontend/src/utils/urlUtils.ts @@ -123,8 +123,13 @@ function getChartUrlParams(excludedUrlParams?: string[]): UrlParamEntries { return getUrlParamEntries(urlParams); } -export function getDashboardUrlParams(): UrlParamEntries { - const urlParams = getUrlParams(RESERVED_DASHBOARD_URL_PARAMS); +export function getDashboardUrlParams( + extraExcludedParams: string[] = [], +): UrlParamEntries { + const urlParams = getUrlParams([ + ...RESERVED_DASHBOARD_URL_PARAMS, + ...extraExcludedParams, + ]); const filterBoxFilters = getActiveFilters(); if (!isEmpty(filterBoxFilters)) urlParams.append(