Skip to content

Commit

Permalink
Pass this as second argument to this.props.onChange
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Jul 3, 2018
1 parent b5cb2ed commit 582b796
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Drop-in replacement for the textarea component which automatically resizes
textarea as content changes. A native React version of the popular
[jQuery Autosize](http://www.jacklmoore.com/autosize/)! Weighs
<span class="weight">1.82 KB</span> (minified & gzipped).
<span class="weight">1.92 KB</span> (minified & gzipped).

This module supports IE9 and above.

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class TextareaAutosize extends React.Component {
if (!this._controlled) {
this._resizeComponent();
}
this.props.onChange(event);
this.props.onChange(event, this);
};

_resizeComponent = (callback = noop) => {
Expand Down

0 comments on commit 582b796

Please sign in to comment.