diff --git a/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx index eb90589644..b6cd7b9a32 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx @@ -67,7 +67,6 @@ describe('DashboardBuilder', () => { colorScheme: undefined, handleComponentDrop() {}, setDirectPathToChild: sinon.spy(), - setMountedTab() {}, }; function setup(overrideProps, useProvider = false, store = mockStore) { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx index ff4421977b..198e2d6264 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx @@ -20,7 +20,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import sinon from 'sinon'; -import { ChartUnconnected as Chart } from 'src/dashboard/components/gridComponents/Chart'; +import Chart from 'src/dashboard/components/gridComponents/Chart'; import SliceHeader from 'src/dashboard/components/SliceHeader'; import ChartContainer from 'src/chart/ChartContainer'; diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx index 63dc8000c4..777837cccd 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx @@ -55,7 +55,6 @@ describe('Tabs', () => { deleteComponent() {}, updateComponents() {}, logEvent() {}, - setMountedTab() {}, }; function setup(overrideProps) { diff --git a/superset-frontend/src/chart/Chart.jsx b/superset-frontend/src/chart/Chart.jsx index 1d386ecf6e..2636751fd6 100644 --- a/superset-frontend/src/chart/Chart.jsx +++ b/superset-frontend/src/chart/Chart.jsx @@ -65,8 +65,6 @@ const propTypes = { onQuery: PropTypes.func, onFilterMenuOpen: PropTypes.func, onFilterMenuClose: PropTypes.func, - // id of the last mounted parent tab - mountedParent: PropTypes.string, }; const BLANK = {}; diff --git a/superset-frontend/src/common/components/Tabs/Tabs.tsx b/superset-frontend/src/common/components/Tabs/Tabs.tsx index de2fabe376..743ea6a533 100644 --- a/superset-frontend/src/common/components/Tabs/Tabs.tsx +++ b/superset-frontend/src/common/components/Tabs/Tabs.tsx @@ -127,7 +127,7 @@ const StyledEditableTabs = styled(StyledTabs)` `} `; -const EditableTabs = Object.assign(StyledEditableTabs, { +export const EditableTabs = Object.assign(StyledEditableTabs, { TabPane: StyledTabPane, }); @@ -142,7 +142,7 @@ EditableTabs.TabPane.defaultProps = { ), }; -const StyledLineEditableTabs = styled(EditableTabs)` +export const StyledLineEditableTabs = styled(EditableTabs)` &.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab { margin: 0 ${({ theme }) => theme.gridUnit * 4}px; padding: ${({ theme }) => `${theme.gridUnit * 3}px ${theme.gridUnit}px`}; @@ -170,9 +170,8 @@ const StyledLineEditableTabs = styled(EditableTabs)` } `; -const LineEditableTabs = Object.assign(StyledLineEditableTabs, { +export const LineEditableTabs = Object.assign(StyledLineEditableTabs, { TabPane: StyledTabPane, }); export default Tabs; -export { EditableTabs, LineEditableTabs }; diff --git a/superset-frontend/src/components/Menu/Menu.tsx b/superset-frontend/src/components/Menu/Menu.tsx index a193b08515..1efb44b52c 100644 --- a/superset-frontend/src/components/Menu/Menu.tsx +++ b/superset-frontend/src/components/Menu/Menu.tsx @@ -191,7 +191,7 @@ export function Menu({ , ]} {(navbarRight.version_string || navbarRight.version_sha) && [ - , + , { - // Entering current tab, DOM is visible and has dimension - this.props.setMountedTab(id); - }} >