react-textarea-autosize
Advanced tools
Comparing version 2.3.1 to 2.4.0
@@ -86,2 +86,10 @@ 'use strict'; | ||
}, { | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps, prevState) { | ||
// Invoke callback when old height does not equal to new one. | ||
if (this.state.height !== prevState.height) { | ||
this.props.onHeightChange(this.state.height); | ||
} | ||
} | ||
}, { | ||
key: 'componentWillUnmount', | ||
@@ -148,2 +156,7 @@ value: function componentWillUnmount() { | ||
/** | ||
* Callback on height changes. | ||
*/ | ||
onHeightChange: _React2['default'].PropTypes.func, | ||
/** | ||
* Try to cache DOM measurements performed by component so that we don't | ||
@@ -177,2 +190,3 @@ * touch DOM when it's not needed. | ||
onChange: _emptyFunction2['default'], | ||
onHeightChange: _emptyFunction2['default'], | ||
useCacheForDOMMeasurements: false | ||
@@ -179,0 +193,0 @@ }, |
{ | ||
"name": "react-textarea-autosize", | ||
"description": "textarea component for React which grows with content", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Andrey Popp", |
@@ -18,9 +18,11 @@ # react-textarea-autosize | ||
</div>, | ||
document.body); | ||
document.getElementById('element')); | ||
``` | ||
## Install | ||
`npm install react-textarea-autosize` | ||
## Demo | ||
http://andreypopp.github.io/react-textarea-autosize/ | ||
@@ -27,0 +29,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28139
260
40