diff --git a/ui/src/dashboards/components/CellEditorOverlay.js b/ui/src/dashboards/components/CellEditorOverlay.js index 8e62f12748..a5708abcd7 100644 --- a/ui/src/dashboards/components/CellEditorOverlay.js +++ b/ui/src/dashboards/components/CellEditorOverlay.js @@ -115,10 +115,13 @@ class CellEditorOverlay extends Component { handleAddQuery() { const {queriesWorkingDraft} = this.state const newIndex = queriesWorkingDraft.length - const newQuery = {...defaultQueryConfig(uuid.v4())} - const nextQueries = queriesWorkingDraft.concat(newQuery) - this.setState({queriesWorkingDraft: nextQueries}) + this.setState({ + queriesWorkingDraft: [ + ...queriesWorkingDraft, + defaultQueryConfig(uuid.v4()), + ], + }) this.handleSetActiveQueryIndex(newIndex) }