Repository URL to install this package:
|
Version:
0.9.5 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const exotic_1 = require("exotic");
/**
* @extends TextBoxComponent @bound
*/
function handleFocus(event, props, state) {
const { validationMethod, onFocus } = props;
// @todo @fixme on the instance being passed...
if (exotic_1.isFunction(state.updateFocused)) {
state.updateFocused(event, this);
}
else {
console.warn('state should implement updateFocused');
}
// this.state.validateInput(event, this)
if (exotic_1.isFunction(validationMethod)) {
validationMethod(event);
}
if (exotic_1.isFunction(onFocus)) {
onFocus(event);
}
// @todo this.state.valid().invalid()
// Removes error highlight
state.setIsValidInput(true);
}
exports.handleFocus = handleFocus;
//# sourceMappingURL=handleFocus.js.map