Skip to content

Commit

Permalink
Remove invalid props of input tag
Browse files Browse the repository at this point in the history
  • Loading branch information
codeaholicguy committed Oct 20, 2016
1 parent d77542a commit d641703
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/FormsyText.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,9 @@ const FormsyText = React.createClass({
}
}

this.setState({ value: event.currentTarget.value });

// Controlled component
if (this.props.onChange) {
this.props.onChange(event, event.currentTarget.value);
}
this.setState({ value: event.currentTarget.value });
if (this.props.onChange) this.props.onChange(event, event.currentTarget.value);
},

handleKeyDown: function handleKeyDown(event) {
Expand All @@ -101,6 +98,7 @@ const FormsyText = React.createClass({
render() {
const {
defaultValue, // eslint-disable-line no-unused-vars
updateImmediately, // eslint-disable-line no-unused-vars
validations, // eslint-disable-line no-unused-vars
validationError, // eslint-disable-line no-unused-vars
validationErrors, // eslint-disable-line no-unused-vars
Expand Down

0 comments on commit d641703

Please sign in to comment.