Skip to content

Commit b8fef50

Browse files
committed
fix(dashboard): Missing filter card styles
1 parent d16eda6 commit b8fef50

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

superset-frontend/src/dashboard/containers/DashboardPage.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* under the License.
1818
*/
1919
import React, { FC, useEffect, useMemo, useRef } from 'react';
20+
import { Global } from '@emotion/react';
2021
import { useHistory } from 'react-router-dom';
2122
import {
2223
CategoricalColorNamespace,
@@ -25,6 +26,7 @@ import {
2526
isFeatureEnabled,
2627
SharedLabelColorSource,
2728
t,
29+
useTheme,
2830
} from '@superset-ui/core';
2931
import pick from 'lodash/pick';
3032
import { useDispatch, useSelector } from 'react-redux';
@@ -57,6 +59,7 @@ import { DashboardContextForExplore } from 'src/types/DashboardContextForExplore
5759
import shortid from 'shortid';
5860
import { RootState } from '../types';
5961
import { getActiveFilters } from '../util/activeDashboardFilters';
62+
import { filterCardPopoverStyle, headerStyles } from '../styles';
6063

6164
export const DashboardPageIdContext = React.createContext('');
6265

@@ -140,6 +143,7 @@ const useSyncDashboardStateWithLocalStorage = () => {
140143
};
141144

142145
export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
146+
const theme = useTheme();
143147
const dispatch = useDispatch();
144148
const history = useHistory();
145149
const dashboardPageId = useSyncDashboardStateWithLocalStorage();
@@ -274,9 +278,12 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
274278
if (!readyToRender) return <Loading />;
275279

276280
return (
277-
<DashboardPageIdContext.Provider value={dashboardPageId}>
278-
<DashboardContainer />
279-
</DashboardPageIdContext.Provider>
281+
<>
282+
<Global styles={[filterCardPopoverStyle(theme), headerStyles(theme)]} />
283+
<DashboardPageIdContext.Provider value={dashboardPageId}>
284+
<DashboardContainer />
285+
</DashboardPageIdContext.Provider>
286+
</>
280287
);
281288
};
282289

0 commit comments

Comments
 (0)