FIx issue with DE UI state not also updating Redux state when first used.
parent
1e93ac0baf
commit
ebcde4a3fd
|
@ -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,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue