react-textarea-autosize
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -39,2 +39,5 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
_this._onChange = function (event) { | ||
if (!_this._controlled) { | ||
_this._resizeComponent(); | ||
} | ||
var _this$props = _this.props, | ||
@@ -67,6 +70,8 @@ valueLink = _this$props.valueLink, | ||
_this.state = { | ||
height: null, | ||
height: props.style && props.style.height || 0, | ||
minHeight: -Infinity, | ||
maxHeight: Infinity | ||
}; | ||
_this._controlled = typeof props.value === 'string'; | ||
return _this; | ||
@@ -90,3 +95,3 @@ } | ||
props.style = _extends({}, props.style, { | ||
height: this.state.height || 0 | ||
height: this.state.height | ||
}); | ||
@@ -93,0 +98,0 @@ |
@@ -51,2 +51,5 @@ 'use strict'; | ||
_this._onChange = function (event) { | ||
if (!_this._controlled) { | ||
_this._resizeComponent(); | ||
} | ||
var _this$props = _this.props, | ||
@@ -79,6 +82,8 @@ valueLink = _this$props.valueLink, | ||
_this.state = { | ||
height: null, | ||
height: props.style && props.style.height || 0, | ||
minHeight: -Infinity, | ||
maxHeight: Infinity | ||
}; | ||
_this._controlled = typeof props.value === 'string'; | ||
return _this; | ||
@@ -102,3 +107,3 @@ } | ||
props.style = _extends({}, props.style, { | ||
height: this.state.height || 0 | ||
height: this.state.height | ||
}); | ||
@@ -105,0 +110,0 @@ |
{ | ||
"name": "react-textarea-autosize", | ||
"description": "textarea component for React which grows with content", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"keywords": "autosize, grow, react, react-component, textarea", | ||
@@ -6,0 +6,0 @@ "repository": "andreypopp/react-textarea-autosize", |
31743
654