mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
refactor: Replace react-bootstrap tabs with Antd tabs (#11118)
* Replace tabs in BuilderComponentPane * Replace tabs in ControlPanelsContainer * Replace tabs in AdhocMetricEditPopover * Replace Tabs in DatasourceEditor * Replace tabs in AdhocFilterEditPopover * Replace tabs in DateFilterControl * Bug fix * Change Tab styles * Fix tests * Fix cypress tests * Lint fix * Fix tests * Change Tabs style in ControlPanelsContainer * Change tabs content height * Lint fix * Add data test * Fix e2e test * Move Tabs file to separate dir * Fix after rebase * Fix e2e tests * Fix after rebase
This commit is contained in:
committed by
GitHub
parent
01ddbd0697
commit
55a3404b71
@@ -26,8 +26,6 @@ import {
|
||||
MenuItem,
|
||||
OverlayTrigger,
|
||||
Radio,
|
||||
Tab,
|
||||
Tabs,
|
||||
Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
import Popover from 'src/common/components/Popover';
|
||||
@@ -37,6 +35,7 @@ import 'react-datetime/css/react-datetime.css';
|
||||
import moment from 'moment';
|
||||
import { t, styled, withTheme } from '@superset-ui/core';
|
||||
|
||||
import Tabs from 'src/common/components/Tabs';
|
||||
import {
|
||||
buildTimeRangeString,
|
||||
formatTimeRange,
|
||||
@@ -435,15 +434,17 @@ class DateFilterControl extends React.Component {
|
||||
}}
|
||||
>
|
||||
<Tabs
|
||||
defaultActiveKey={this.state.tab === TABS.DEFAULTS ? 1 : 2}
|
||||
defaultActiveKey={this.state.tab === TABS.DEFAULTS ? '1' : '2'}
|
||||
id="type"
|
||||
className="time-filter-tabs"
|
||||
onSelect={this.changeTab}
|
||||
>
|
||||
<Tab eventKey={1} title="Defaults">
|
||||
<FormGroup>{timeFrames}</FormGroup>
|
||||
</Tab>
|
||||
<Tab eventKey={2} title="Custom">
|
||||
<Tabs.TabPane key="1" tab="Defaults" forceRender>
|
||||
<div style={{ marginLeft: '8px' }}>
|
||||
<FormGroup>{timeFrames}</FormGroup>
|
||||
</div>
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="2" tab="Custom">
|
||||
<FormGroup>
|
||||
<PopoverSection
|
||||
title="Relative to today"
|
||||
@@ -573,7 +574,7 @@ class DateFilterControl extends React.Component {
|
||||
</div>
|
||||
</PopoverSection>
|
||||
</FormGroup>
|
||||
</Tab>
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
<div className="clearfix">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user