diff --git a/src/prompt-input/internal.tsx b/src/prompt-input/internal.tsx index 805530536f..d9bb16d8bc 100644 --- a/src/prompt-input/internal.tsx +++ b/src/prompt-input/internal.tsx @@ -111,7 +111,7 @@ const InternalPromptInput = React.forwardRef( const minTextareaHeight = `calc(${LINE_HEIGHT} + ${tokens.spaceScaledXxs} * 2)`; // the min height of Textarea with 1 row textareaRef.current.style.height = `min(max(${scrollHeight}, ${minTextareaHeight}), ${maxRowsHeight})`; } - }, [maxRows, LINE_HEIGHT, PADDING]); + }, [minRows, maxRows, LINE_HEIGHT, PADDING]); useEffect(() => { const handleResize = () => {