Fix visualization selection functionality.
parent
c336805943
commit
562729b6b5
|
@ -29,6 +29,7 @@ class CellEditorOverlay extends Component {
|
|||
|
||||
this.handleSaveCell = ::this.handleSaveCell
|
||||
|
||||
this.handleSelectGraphType = ::this.handleSelectGraphType
|
||||
this.handleSelectDisplayOptions = ::this.handleSelectDisplayOptions
|
||||
this.handleSetActiveQueryIndex = ::this.handleSetActiveQueryIndex
|
||||
this.handleEditRawText = ::this.handleEditRawText
|
||||
|
@ -197,7 +198,10 @@ class CellEditorOverlay extends Component {
|
|||
isSavable={queriesWorkingDraft.every(isQuerySavable)}
|
||||
/>
|
||||
{isDisplayOptionsTabOpen
|
||||
? <DisplayOptions />
|
||||
? <DisplayOptions
|
||||
selectedGraphType={cellWorkingType}
|
||||
onSelectGraphType={this.handleSelectGraphType}
|
||||
/>
|
||||
: <QueryMaker
|
||||
source={source}
|
||||
templates={templates}
|
||||
|
|
|
@ -1,8 +1,20 @@
|
|||
import React, {PropTypes} from 'react'
|
||||
|
||||
const DisplayOptions = () =>
|
||||
<div className="display-options">Display Options</div>
|
||||
import GraphTypeSelector from 'src/dashboards/components/GraphTypeSelector'
|
||||
|
||||
DisplayOptions.propTypes = {}
|
||||
const DisplayOptions = ({selectedGraphType, onSelectGraphType}) =>
|
||||
<div className="display-options">
|
||||
<GraphTypeSelector
|
||||
selectedGraphType={selectedGraphType}
|
||||
onSelectGraphType={onSelectGraphType}
|
||||
/>
|
||||
</div>
|
||||
|
||||
const {func, string} = PropTypes
|
||||
|
||||
DisplayOptions.propTypes = {
|
||||
selectedGraphType: string.isRequired,
|
||||
onSelectGraphType: func.isRequired,
|
||||
}
|
||||
|
||||
export default DisplayOptions
|
||||
|
|
|
@ -5,7 +5,6 @@ import graphTypes from 'hson!shared/data/graphTypes.hson'
|
|||
|
||||
const GraphTypeSelector = ({selectedGraphType, onSelectGraphType}) =>
|
||||
<div className="overlay-controls">
|
||||
<h3 className="overlay--graph-name">Cell Editor</h3>
|
||||
<div className="overlay-controls--right">
|
||||
<p>Visualization Type</p>
|
||||
<ul className="nav nav-tablist nav-tablist-sm">
|
||||
|
|
Loading…
Reference in New Issue