FIx issue with DE UI state not also updating Redux state when first used.

pull/10616/head
Hunter Trujillo 2017-12-20 16:49:57 -07:00
parent 1e93ac0baf
commit ebcde4a3fd
2 changed files with 5 additions and 3 deletions

View File

@ -4,10 +4,10 @@ import {getQueryConfig} from 'shared/apis'
import {errorThrown} from 'shared/actions/errors'
export const addQuery = () => ({
export const addQuery = (queryID = uuid.v4()) => ({
type: 'DE_ADD_QUERY',
payload: {
queryID: uuid.v4(),
queryID,
},
})

View File

@ -36,7 +36,9 @@ class DataExplorer extends Component {
const {queryConfigs} = this.props
if (queryConfigs.length === 0) {
queryConfigs.push(defaultQueryConfig())
const qc = defaultQueryConfig()
this.props.queryConfigActions.addQuery(qc.id)
queryConfigs.push(qc)
}
return queryConfigs[0]