Socket
Socket
Sign inDemoInstall

react-textarea-autosize

Package Overview
Dependencies
Maintainers
2
Versions
98
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 4.0.1 to 4.0.2

16

lib/calculateNodeHeight.js

@@ -0,1 +1,7 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = calculateNodeHeight;
/**

@@ -5,8 +11,2 @@ * calculateNodeHeight(uiTextNode, useCache = false)

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = calculateNodeHeight;
var HIDDEN_TEXTAREA_STYLE = '\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';

@@ -17,3 +17,3 @@

var computedStyleCache = {};
var hiddenTextarea = undefined;
var hiddenTextarea = void 0;

@@ -43,2 +43,3 @@ function calculateNodeHeight(uiTextNode) {

// narrower for content
hiddenTextarea.setAttribute('style', sizingStyle + ';' + HIDDEN_TEXTAREA_STYLE);

@@ -115,2 +116,1 @@ hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';

}
module.exports = exports['default'];

@@ -72,3 +72,3 @@ 'use strict';

props.style = _extends({}, props.style, {
height: this.state.height
height: this.state.height || 0
});

@@ -75,0 +75,0 @@ var maxHeight = Math.max(props.style.maxHeight ? props.style.maxHeight : Infinity, this.state.maxHeight);

{
"name": "react-textarea-autosize",
"description": "textarea component for React which grows with content",
"version": "4.0.1",
"version": "4.0.2",
"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