Skip to content

Commit

Permalink
fix(Dashboard): Exclude edit param in async screenshot (apache#30962)
Browse files Browse the repository at this point in the history
  • Loading branch information
geido authored Nov 18, 2024
1 parent e528cb4 commit 1b63b8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default function DownloadScreenshot({
anchor,
activeTabs,
dataMask,
urlParams: getDashboardUrlParams(),
urlParams: getDashboardUrlParams(['edit']),
},
})
.then(({ json }) => {
Expand Down
9 changes: 7 additions & 2 deletions superset-frontend/src/utils/urlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1b63b8f

Please sign in to comment.