Skip to content

Commit

Permalink
relase 0.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes committed Jan 28, 2016
1 parent 5fdb24e commit 7ff9a61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/FormsyText.js
Expand Up @@ -23,7 +23,9 @@ var FormsyText = _react2['default'].createClass({

propTypes: {
name: _react2['default'].PropTypes.string.isRequired,
value: _react2['default'].PropTypes.string
value: _react2['default'].PropTypes.string,
onFocus: _react2['default'].PropTypes.func,
onBlur: _react2['default'].PropTypes.func
},

handleChange: function handleChange(event) {
Expand All @@ -43,6 +45,7 @@ var FormsyText = _react2['default'].createClass({

handleBlur: function handleBlur(event) {
this.setValue(event.currentTarget.value);
if (this.props.onBlur) this.props.onBlur(event);
},

handleEnterKeyDown: function handleEnterKeyDown(event) {
Expand All @@ -54,6 +57,7 @@ var FormsyText = _react2['default'].createClass({
defaultValue: this.props.value,
onChange: this.handleChange,
onBlur: this.handleBlur,
onFocus: this.props.onFocus,
onEnterKeyDown: this.handleEnterKeyDown,
errorText: this.getErrorMessage(),
value: this.getValue()
Expand Down

0 comments on commit 7ff9a61

Please sign in to comment.