fix(visualizations): add type checking to AxesOptions

pull/5110/head
Alirie Gray 2019-03-14 15:01:41 -07:00
parent 63e16b0e13
commit af42412080
2 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@
1. [#5079](https://github.com/influxdata/chronograf/pull/5079): Fix multiple organizations not showing configured kapacitors
1. [#5078](https://github.com/influxdata/chronograf/pull/5078): Fix the inability to edit kapacitor info in the onboarding wizard
1. [#5083](https://github.com/influxdata/chronograf/pull/5083): Fix the column names in the Window function example
1. [#5110](https://github.com/influxdata/chronograf/pull/5110): Fix the input for line controls in visualization options.
## v1.7.7 [2018-01-16]

View File

@ -129,12 +129,14 @@ export default class OptIn extends Component<Props, State> {
private handleChangeCustomValue = (
e: ChangeEvent<HTMLInputElement>
): void => {
const {min, max} = this.props
const {min, max, type} = this.props
const {value} = e.target
if (value === '') {
this.setCustomValue('')
} else {
} else if (type === 'text') {
this.setCustomValue(value)
} else if (type === 'number') {
this.setCustomValue(toValueInRange(value, min, max))
}
}