From 97563049f4f456ca4f308d0f26282277e6210bfc Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Thu, 14 Dec 2023 20:32:01 +0800 Subject: [PATCH] refactor: bump rc-input to v1.4.0 (#52) * refactor: bump rc-input to v1.4.0 * chore: update snapshot * chore: code clean --- package.json | 2 +- src/TextArea.tsx | 43 ++++++++++++------------- tests/__snapshots__/index.spec.tsx.snap | 2 +- 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index a661eb9..05769ed 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", - "rc-input": "~1.3.5", + "rc-input": "~1.4.0", "rc-resize-observer": "^1.0.0", "rc-util": "^5.27.0" }, diff --git a/src/TextArea.tsx b/src/TextArea.tsx index 93de700..84250d9 100644 --- a/src/TextArea.tsx +++ b/src/TextArea.tsx @@ -206,14 +206,14 @@ const TextArea = React.forwardRef( const isPureTextArea = !rest.autoSize && !showCount && !allowClear; - const textarea = ( + return ( ( }, }} hidden={hidden} - inputElement={ - - } - /> + > + + ); - - return textarea; }, ); diff --git a/tests/__snapshots__/index.spec.tsx.snap b/tests/__snapshots__/index.spec.tsx.snap index 5e63fb3..2e02281 100644 --- a/tests/__snapshots__/index.spec.tsx.snap +++ b/tests/__snapshots__/index.spec.tsx.snap @@ -7,7 +7,7 @@ exports[`TextArea classNames and styles should work 1`] = ` style="color: red; background: red;" />