diff --git a/components/input/TextArea.tsx b/components/input/TextArea.tsx index 9b56290186..2fe065f35f 100644 --- a/components/input/TextArea.tsx +++ b/components/input/TextArea.tsx @@ -45,7 +45,7 @@ class TextArea extends React.Component { componentDidUpdate(prevProps: TextAreaProps) { // Re-render with the new content then recalculate the height as required. if (prevProps.value !== this.props.value) { - this.resizeOnNextFrame(); + this.resizeTextarea(); } } diff --git a/components/input/__tests__/__snapshots__/demo.test.js.snap b/components/input/__tests__/__snapshots__/demo.test.js.snap index bfd0baebab..a75232535e 100644 --- a/components/input/__tests__/__snapshots__/demo.test.js.snap +++ b/components/input/__tests__/__snapshots__/demo.test.js.snap @@ -230,6 +230,13 @@ exports[`renders ./components/input/demo/autosize-textarea.md correctly 1`] = ` class="ant-input" placeholder="Autosize height with minimum and maximum number of lines" /> +
+