Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / dist / inputs / TextBox / handlers / handleFocus.js
Size: Mime:
"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