Rename queries to queryConfigs in DisplayOptions for clarity and accuracy
parent
3fba1ba5b0
commit
d8963ca813
|
@ -240,7 +240,7 @@ class CellEditorOverlay extends Component {
|
||||||
onSetYAxisBoundMax={this.handleSetYAxisBoundMax}
|
onSetYAxisBoundMax={this.handleSetYAxisBoundMax}
|
||||||
onSetLabel={this.handleSetLabel}
|
onSetLabel={this.handleSetLabel}
|
||||||
axes={axes}
|
axes={axes}
|
||||||
queries={queriesWorkingDraft}
|
queryConfigs={queriesWorkingDraft}
|
||||||
/>
|
/>
|
||||||
: <QueryMaker
|
: <QueryMaker
|
||||||
source={source}
|
source={source}
|
||||||
|
|
|
@ -9,18 +9,18 @@ class DisplayOptions extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
const {axes, queries} = props
|
const {axes, queryConfigs} = props
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
axes: this.setDefaultLabels(axes, queries),
|
axes: this.setDefaultLabels(axes, queryConfigs),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
if (nextProps.queries.length !== this.props.queries.length) {
|
if (nextProps.queryConfigs.length !== this.props.queryConfigs.length) {
|
||||||
const {axes, queries} = nextProps
|
const {axes, queryConfigs} = nextProps
|
||||||
|
|
||||||
this.setState({axes: this.setDefaultLabels(axes, queries)})
|
this.setState({axes: this.setDefaultLabels(axes, queryConfigs)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ DisplayOptions.propTypes = {
|
||||||
onSetYAxisBoundMax: func.isRequired,
|
onSetYAxisBoundMax: func.isRequired,
|
||||||
onSetLabel: func.isRequired,
|
onSetLabel: func.isRequired,
|
||||||
axes: shape({}).isRequired,
|
axes: shape({}).isRequired,
|
||||||
queries: arrayOf(shape()).isRequired,
|
queryConfigs: arrayOf(shape()).isRequired,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DisplayOptions
|
export default DisplayOptions
|
||||||
|
|
Loading…
Reference in New Issue