Skip to content

Commit

Permalink
fix: toggle fullscreen on the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Jun 4, 2021
1 parent 004a6d9 commit 526b5a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,12 @@ class HeaderActionsDropdown extends React.PureComponent {
break;
}
case MENU_KEYS.TOGGLE_FULLSCREEN: {
const hasStandalone = !!getUrlParam(URL_PARAMS.standalone);
const url = getDashboardUrl(
window.location.pathname,
getActiveFilters(),
window.location.hash,
getUrlParam(URL_PARAMS.standalone),
!hasStandalone,
);
window.location.replace(url);
break;
Expand Down
5 changes: 4 additions & 1 deletion superset-frontend/src/dashboard/util/getDashboardUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export default function getDashboardUrl(
);

if (standalone) {
newSearchParams.set(URL_PARAMS.standalone.name, standalone.toString());
newSearchParams.set(
URL_PARAMS.standalone.name,
standalone.toString(),
);
}

const hashSection = hash ? `#${hash}` : '';
Expand Down

0 comments on commit 526b5a5

Please sign in to comment.