This is an automated email from the ASF dual-hosted git repository.

diegopucci pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b63b8f3c7 fix(Dashboard): Exclude edit param in async screenshot 
(#30962)
1b63b8f3c7 is described below

commit 1b63b8f3c70e3c60388d79684beb9ff58ab7ef0c
Author: Geido <[email protected]>
AuthorDate: Mon Nov 18 16:34:23 2024 +0200

    fix(Dashboard): Exclude edit param in async screenshot (#30962)
---
 .../components/menu/DownloadMenuItems/DownloadScreenshot.tsx     | 2 +-
 superset-frontend/src/utils/urlUtils.ts                          | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
 
b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
index 17ec6ee8d8..e70a634c49 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 49fab2dd1f..80e8948d22 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(

Reply via email to