Repository URL to install this package:
|
Version:
2.1.2-perf.5 ▾
|
import { isFunction } from 'exotic';
/**
* @extends TextBoxComponent @bound
*/
export function handleFocus(event, props, state) {
const {
validationMethod,
onFocus
} = props; // @todo @fixme on the instance being passed...
if (isFunction(state.updateFocused)) {
state.updateFocused(event, this);
} else {
console.warn('state should implement updateFocused');
} // this.state.validateInput(event, this)
if (isFunction(validationMethod)) {
validationMethod(event);
}
if (isFunction(onFocus)) {
onFocus(event);
} // @todo this.state.valid().invalid()
// Removes error highlight
state.setIsValidInput(true);
} //# sourceMappingURL=handleFocus.js.map