diff --git a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx index 3410accd1..361f9880f 100644 --- a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx +++ b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx @@ -44,9 +44,19 @@ export default function DownloadScreenshot({ logEvent?: Function; format: string; }) { - const anchor = useSelector( - (state: RootState) => last(state.dashboardState.activeTabs) || undefined, + const activeTabs = useSelector( + (state: RootState) => state.dashboardState.activeTabs || undefined, ); + + const anchor = useSelector( + (state: RootState) => + last(state.dashboardState.directPathToChild) || undefined, + ); + + const dataMask = useSelector( + (state: RootState) => state.dataMask || undefined, + ); + const { addDangerToast, addSuccessToast, addInfoToast } = useToasts(); const onDownloadScreenshot = () => { @@ -106,6 +116,8 @@ export default function DownloadScreenshot({ endpoint: `/api/v1/dashboard/${dashboardId}/cache_dashboard_screenshot`, jsonPayload: { anchor, + activeTabs, + dataMask, }, }) .then(({ json }) => {