Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updateSelection(value: any) {
this.value = this.schema.type === 'integer' ? common.toInteger(value) : common.toNumber(value)
this.validate()
this.updateValue.emit({ value: this.value, isValid: !this.errorMessage })
}
trackByFunction = (index: number) => {
onChange(e: { target: { value: string } }) {
this.value = this.schema.type === 'integer' ? common.toInteger(e.target.value) : common.toNumber(e.target.value)
this.validate()
this.$emit('update-value', { value: this.value, isValid: !this.errorMessage })
}
private onChange = (e: React.FormEvent<{ value: string }>) => {
this.value = this.props.schema.type === 'integer' ? common.toInteger(e.currentTarget.value) : common.toNumber(e.currentTarget.value)
this.validate()
this.setState({ value: this.value })
this.props.updateValue(this.value, !this.errorMessage)
}
private validate() {