You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kg...@apache.org on 2025/08/27 09:11:09 UTC
(superset) branch master updated: perf: Use react-router to toggle fullscreen mode on dashboard (#34857)
This is an automated email from the ASF dual-hosted git repository.
kgabryje 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 ce3b93d8a0 perf: Use react-router to toggle fullscreen mode on dashboard (#34857)
ce3b93d8a0 is described below
commit ce3b93d8a0e693b637eb2ad9b453b9777b8f3b50
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Wed Aug 27 11:11:03 2025 +0200
perf: Use react-router to toggle fullscreen mode on dashboard (#34857)
---
.../src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx b/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx
index f305649e06..99d7a0c0a8 100644
--- a/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx
+++ b/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx
@@ -18,6 +18,7 @@
*/
import { useState, useEffect, useCallback, useMemo } from 'react';
import { useSelector } from 'react-redux';
+import { useHistory } from 'react-router-dom';
import { Menu, MenuItem } from '@superset-ui/core/components/Menu';
import { t } from '@superset-ui/core';
import { isEmpty } from 'lodash';
@@ -65,6 +66,7 @@ export const useHeaderActionsMenu = ({
setCurrentReportDeleting,
}: HeaderDropdownProps) => {
const [isDropdownVisible, setIsDropdownVisible] = useState(false);
+ const history = useHistory();
const directPathToChild = useSelector(
(state: RootState) => state.dashboardState.directPathToChild,
);
@@ -97,7 +99,7 @@ export const useHeaderActionsMenu = ({
hash: window.location.hash,
standalone: isCurrentlyStandalone ? null : 1,
});
- window.location.replace(url);
+ history.replace(url);
break;
}
case MenuKeys.ManageEmbedded: