Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

react-textarea-autosize

Package Overview
Dependencies
Maintainers
2
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-textarea-autosize - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

22

lib/TextareaAutosize.js

@@ -83,5 +83,14 @@ 'use strict';

// Re-render with the new content then recalculate the height as required.
onNextFrame(this._resizeComponent);
this.onNextFrameActionId = onNextFrame(this._resizeComponent);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
//remove any scheduled events to prevent manipulating the node after it's
//been unmounted
if (this.onNextFrameActionId) {
clearNextFrameAction(this.onNextFrameActionId);
}
}
}, {
key: '_onChange',

@@ -179,7 +188,14 @@ value: function _onChange(e) {

if (window.requestAnimationFrame) {
window.requestAnimationFrame(cb);
return window.requestAnimationFrame(cb);
}
return window.setTimeout(cb, 1);
}
function clearNextFrameAction(nextFrameId) {
if (window.cancelAnimationFrame) {
window.cancelAnimationFrame(nextFrameId);
} else {
window.setTimeout(cb, 1);
window.clearTimeout(nextFrameId);
}
}
module.exports = exports['default'];

2

package.json
{
"name": "react-textarea-autosize",
"description": "textarea component for React which grows with content",
"version": "2.2.2",
"version": "2.2.3",
"author": {

@@ -6,0 +6,0 @@ "name": "Andrey Popp",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc