mirror of
https://github.com/apache/superset.git
synced 2026-08-12 11:11:01 +00:00
[hofix] work around circular deps (#3598)
* [hofix] work around circular deps * lint
This commit is contained in:
committed by
GitHub
parent
1528288b59
commit
ed212440b5
@@ -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 <div className="text-muted">{this.props.placeholder}</div>;
|
||||
}
|
||||
const control = controlMap[this.props.control];
|
||||
return (
|
||||
<SortableListGroup
|
||||
useDragHandle
|
||||
@@ -79,7 +81,7 @@ export default class CollectionControl extends React.Component {
|
||||
<SortableDragger />
|
||||
</div>
|
||||
<div className="pull-left">
|
||||
<this.props.control
|
||||
<control
|
||||
{...o}
|
||||
onChange={this.onChange.bind(this, i)}
|
||||
/>
|
||||
|
||||
-1
@@ -29,5 +29,4 @@ const controlMap = {
|
||||
TimeSeriesColumnControl,
|
||||
VizTypeControl,
|
||||
};
|
||||
|
||||
export default controlMap;
|
||||
@@ -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',
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user