mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +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 = {
|
||||
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]);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user