From c457e2e19d0ddbae7c2b7f53c0ea4953631e9d3f Mon Sep 17 00:00:00 2001 From: elenitaex5 Date: Tue, 24 Oct 2023 13:24:34 +0200 Subject: [PATCH] fix: saving min height if is included in style props --- src/components/TextAreaResizable/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/TextAreaResizable/index.tsx b/src/components/TextAreaResizable/index.tsx index 3744bff..376835b 100644 --- a/src/components/TextAreaResizable/index.tsx +++ b/src/components/TextAreaResizable/index.tsx @@ -62,6 +62,11 @@ export const TextAreaResizable = (props: TextAreaResizableProps) => { } useEffect(() => { + //@ts-ignore + if (props.style?.minHeight && props.style.minHeight > rows * TEXTAREA_LINE_HEIGHT) { + return setMinHeight(props.style.minHeight) + } + setMinHeight(rows * TEXTAREA_LINE_HEIGHT) }, [rows])