Allowing to integrate time as a groupby value (#3229)

This commit is contained in:
Maxime Beauchemin
2017-08-02 21:33:27 -07:00
committed by GitHub
parent 91bd38a851
commit 4ea770068b
5 changed files with 47 additions and 28 deletions

View File

@@ -28,6 +28,7 @@ class ControlPanelsContainer extends React.Component {
this.getControlData = this.getControlData.bind(this);
}
getControlData(controlName) {
const control = this.props.controls[controlName];
// Identifying mapStateToProps function to apply (logic can't be in store)
let mapF = controls[controlName].mapStateToProps;
@@ -38,9 +39,9 @@ class ControlPanelsContainer extends React.Component {
}
// Applying mapStateToProps if needed
if (mapF) {
return Object.assign({}, this.props.controls[controlName], mapF(this.props.exploreState));
return Object.assign({}, control, mapF(this.props.exploreState, control));
}
return this.props.controls[controlName];
return control;
}
sectionsToRender() {
return sectionsToRender(this.props.form_data.viz_type, this.props.datasource_type);