Repository URL to install this package:
Version:
0.9.5 ▾
|
import { isFunction } from 'exotic'
import { TextBoxProps, TextBoxState, TextBoxComponent } from '../typings'
/**
* @extends TextBoxComponent @bound
*/
export function handleBlur(event: Event, props: TextBoxProps, state: TextBoxState) {
const { onBlur, onFormValidation } = props
// @todo @fixme should not need to pass in
state.updateFocused(event, this)
if (isFunction(onBlur)) {
onBlur(state.value)
}
if (isFunction(onFormValidation)) {
onFormValidation(state, props)
}
}