mirror of
https://github.com/apache/superset.git
synced 2026-04-25 02:55:07 +00:00
fix(chart): set tab name as chart name (#33694)
Co-authored-by: Phuc Hung Nguyen <phucnguyen@geotab.com>
This commit is contained in:
@@ -71,8 +71,6 @@ const DashboardBuilder = lazy(
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const originalDocumentTitle = document.title;
|
|
||||||
|
|
||||||
type PageProps = {
|
type PageProps = {
|
||||||
idOrSlug: string;
|
idOrSlug: string;
|
||||||
};
|
};
|
||||||
@@ -204,7 +202,7 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
|
|||||||
document.title = dashboard_title;
|
document.title = dashboard_title;
|
||||||
}
|
}
|
||||||
return () => {
|
return () => {
|
||||||
document.title = originalDocumentTitle;
|
document.title = 'Superset';
|
||||||
};
|
};
|
||||||
}, [dashboard_title]);
|
}, [dashboard_title]);
|
||||||
|
|
||||||
|
|||||||
@@ -269,6 +269,15 @@ function ExploreViewContainer(props) {
|
|||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (props.sliceName) {
|
||||||
|
document.title = props.sliceName;
|
||||||
|
}
|
||||||
|
return () => {
|
||||||
|
document.title = 'Superset';
|
||||||
|
};
|
||||||
|
}, [props.sliceName]);
|
||||||
|
|
||||||
const addHistory = useCallback(
|
const addHistory = useCallback(
|
||||||
async ({ isReplace = false, title } = {}) => {
|
async ({ isReplace = false, title } = {}) => {
|
||||||
const formData = props.dashboardId
|
const formData = props.dashboardId
|
||||||
|
|||||||
Reference in New Issue
Block a user