react-textarea-autosize
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -0,1 +1,5 @@ | ||
/** | ||
* calculateNodeHeight(uiTextNode, useCache = false) | ||
*/ | ||
'use strict'; | ||
@@ -7,8 +11,4 @@ | ||
exports['default'] = calculateNodeHeight; | ||
/** | ||
* calculateNodeHeight(uiTextNode, useCache = false) | ||
*/ | ||
var HIDDEN_TEXTAREA_STYLE = '\n min-height:none !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'; | ||
var HIDDEN_TEXTAREA_STYLE = '\n height:0;\n visibility:hidden;\n overflow:hidden;\n position:absolute;\n z-index:-1000;\n top:0;\n right:0\n'; | ||
var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'padding-left', 'padding-right', 'border-width', 'box-sizing']; | ||
@@ -20,5 +20,5 @@ | ||
function calculateNodeHeight(uiTextNode) { | ||
var useCache = arguments[1] === undefined ? false : arguments[1]; | ||
var minRows = arguments[2] === undefined ? null : arguments[2]; | ||
var maxRows = arguments[3] === undefined ? null : arguments[3]; | ||
var useCache = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; | ||
var minRows = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; | ||
var maxRows = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3]; | ||
@@ -81,3 +81,3 @@ if (!hiddenTextarea) { | ||
function calculateNodeStyling(node) { | ||
var useCache = arguments[1] === undefined ? false : arguments[1]; | ||
var useCache = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; | ||
@@ -99,3 +99,3 @@ var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name'); | ||
var sizingStyle = SIZING_STYLE.map(function (name) { | ||
return '' + name + ':' + style.getPropertyValue(name); | ||
return name + ':' + style.getPropertyValue(name); | ||
}).join(';'); | ||
@@ -102,0 +102,0 @@ |
@@ -211,2 +211,9 @@ /** | ||
return this._rootDOMNode.value; | ||
}, | ||
/** | ||
* Set the current value of <textarea /> DOM node. | ||
*/ | ||
set: function set(val) { | ||
this._rootDOMNode.value = val; | ||
} | ||
@@ -213,0 +220,0 @@ }]); |
{ | ||
"name": "react-textarea-autosize", | ||
"description": "textarea component for React which grows with content", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Andrey Popp", |
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
29470
297