Rename queries to queryConfigs in DisplayOptions for clarity and accuracy

pull/10616/head
Jared Scheib 2017-08-09 15:37:04 -07:00
parent 3fba1ba5b0
commit d8963ca813
2 changed files with 7 additions and 7 deletions

View File

@ -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}

View File

@ -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