Update CEO colors state from threshold value input

pull/10616/head
Alex P 2017-11-21 12:43:32 -08:00
parent ebcdf44269
commit 63618a7d10
1 changed files with 11 additions and 0 deletions

View File

@ -101,6 +101,17 @@ class CellEditorOverlay extends Component {
this.setState({colors: newColors})
}
handleChangeColorValue = threshold => e => {
const {colors} = this.state
const newColors = colors.map(
color =>
color.id === threshold.id ? {...color, value: e.target.value} : color
)
this.setState({colors: newColors})
}
queryStateReducer = queryModifier => (queryID, ...payload) => {
const {queriesWorkingDraft} = this.state
const query = queriesWorkingDraft.find(q => q.id === queryID)