rc-textarea
Advanced tools
Comparing version 0.3.6 to 0.3.7
import * as React from 'react'; | ||
import { TextAreaProps } from '.'; | ||
import type { TextAreaProps } from '.'; | ||
declare enum RESIZE_STATUS { | ||
@@ -4,0 +4,0 @@ NONE = 0, |
@@ -12,3 +12,4 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import classNames from 'classnames'; | ||
import calculateNodeHeight from './calculateNodeHeight'; // eslint-disable-next-line @typescript-eslint/naming-convention | ||
import calculateNodeHeight from './calculateNodeHeight'; | ||
import shallowEqual from 'shallowequal'; // eslint-disable-next-line @typescript-eslint/naming-convention | ||
@@ -144,4 +145,4 @@ var RESIZE_STATUS; | ||
value: function componentDidUpdate(prevProps) { | ||
// Re-render with the new content then recalculate the height as required. | ||
if (prevProps.value !== this.props.value) { | ||
// Re-render with the new content or new autoSize property then recalculate the height as required. | ||
if (prevProps.value !== this.props.value || !shallowEqual(prevProps.autoSize, this.props.autoSize)) { | ||
this.resizeTextarea(); | ||
@@ -148,0 +149,0 @@ } |
import * as React from 'react'; | ||
import { TextAreaProps } from '.'; | ||
import type { TextAreaProps } from '.'; | ||
declare enum RESIZE_STATUS { | ||
@@ -4,0 +4,0 @@ NONE = 0, |
@@ -36,2 +36,4 @@ "use strict"; | ||
var _shallowequal = _interopRequireDefault(require("shallowequal")); | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
@@ -165,4 +167,4 @@ var RESIZE_STATUS; | ||
value: function componentDidUpdate(prevProps) { | ||
// Re-render with the new content then recalculate the height as required. | ||
if (prevProps.value !== this.props.value) { | ||
// Re-render with the new content or new autoSize property then recalculate the height as required. | ||
if (prevProps.value !== this.props.value || !(0, _shallowequal.default)(prevProps.autoSize, this.props.autoSize)) { | ||
this.resizeTextarea(); | ||
@@ -169,0 +171,0 @@ } |
{ | ||
"name": "rc-textarea", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "Pretty Textarea react component used in used in ant.design", | ||
@@ -48,3 +48,4 @@ "keywords": [ | ||
"rc-resize-observer": "^1.0.0", | ||
"rc-util": "^5.7.0" | ||
"rc-util": "^5.7.0", | ||
"shallowequal": "^1.1.0" | ||
}, | ||
@@ -56,2 +57,3 @@ "devDependencies": { | ||
"@types/react-dom": "^16.9.0", | ||
"@types/shallowequal": "^1.1.1", | ||
"@umijs/fabric": "^2.0.8", | ||
@@ -58,0 +60,0 @@ "coveralls": "^3.0.6", |
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
41372
854
7
23
17
+ Addedshallowequal@^1.1.0
+ Addedshallowequal@1.1.0(transitive)