diff --git a/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx b/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx index 74f0d9b45cd6f..8fcecaac2589c 100644 --- a/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx +++ b/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx @@ -8,6 +8,7 @@ import { import InfoTooltipWithTrigger from '../../../components/InfoTooltipWithTrigger'; import ControlHeader from '../ControlHeader'; +import controlMap from './'; const propTypes = { name: PropTypes.string.isRequired, @@ -63,6 +64,7 @@ export default class CollectionControl extends React.Component { if (this.props.value.length === 0) { return
{this.props.placeholder}
; } + const control = controlMap[this.props.control]; return (
- diff --git a/superset/assets/javascripts/explore/components/controls/index.jsx b/superset/assets/javascripts/explore/components/controls/index.js similarity index 99% rename from superset/assets/javascripts/explore/components/controls/index.jsx rename to superset/assets/javascripts/explore/components/controls/index.js index 499e6055f6b13..e2840fbc52bb2 100644 --- a/superset/assets/javascripts/explore/components/controls/index.jsx +++ b/superset/assets/javascripts/explore/components/controls/index.js @@ -29,5 +29,4 @@ const controlMap = { TimeSeriesColumnControl, VizTypeControl, }; - export default controlMap; diff --git a/superset/assets/javascripts/explore/stores/controls.jsx b/superset/assets/javascripts/explore/stores/controls.jsx index cd5d38a1b3540..ff6c833018c43 100644 --- a/superset/assets/javascripts/explore/stores/controls.jsx +++ b/superset/assets/javascripts/explore/stores/controls.jsx @@ -5,7 +5,6 @@ import { ALL_COLOR_SCHEMES, spectrums } from '../../modules/colors'; import MetricOption from '../../components/MetricOption'; import ColumnOption from '../../components/ColumnOption'; import { t } from '../../locales'; -import controlMap from '../components/controls'; const D3_FORMAT_DOCS = 'D3 format syntax: https://github.com/d3/d3-format'; @@ -1444,7 +1443,7 @@ export const controls = { type: 'CollectionControl', label: t('Time Series Columns'), validators: [v.nonEmpty], - control: controlMap.TimeSeriesColumnControl, + control: 'TimeSeriesColumnControl', }, }; diff --git a/superset/assets/visualizations/time_table.jsx b/superset/assets/visualizations/time_table.jsx index 928352cfc7b10..d092066c636b9 100644 --- a/superset/assets/visualizations/time_table.jsx +++ b/superset/assets/visualizations/time_table.jsx @@ -3,7 +3,7 @@ import React from 'react'; import propTypes from 'prop-types'; import { Table, Thead, Th } from 'reactable'; import d3 from 'd3'; -import { Sparkline, LineSeries, PointSeries } from '@data-ui/sparkline'; +import { Sparkline, LineSeries } from '@data-ui/sparkline'; import MetricOption from '../javascripts/components/MetricOption'; import TooltipWrapper from '../javascripts/components/TooltipWrapper'; @@ -94,10 +94,6 @@ function viz(slice, payload) { showArea={false} stroke={brandColor} /> -
);