fix(chart): set tab name as chart name (#33694)

Co-authored-by: Phuc Hung Nguyen <phucnguyen@geotab.com>
This commit is contained in:
Phuc Hung Nguyen
2025-06-09 19:07:44 -04:00
committed by GitHub
parent ca74ae75a6
commit bb6bd85c1d
2 changed files with 10 additions and 3 deletions

View File

@@ -71,8 +71,6 @@ const DashboardBuilder = lazy(
),
);
const originalDocumentTitle = document.title;
type PageProps = {
idOrSlug: string;
};
@@ -204,7 +202,7 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
document.title = dashboard_title;
}
return () => {
document.title = originalDocumentTitle;
document.title = 'Superset';
};
}, [dashboard_title]);

View File

@@ -269,6 +269,15 @@ function ExploreViewContainer(props) {
const theme = useTheme();
useEffect(() => {
if (props.sliceName) {
document.title = props.sliceName;
}
return () => {
document.title = 'Superset';
};
}, [props.sliceName]);
const addHistory = useCallback(
async ({ isReplace = false, title } = {}) => {
const formData = props.dashboardId