From cb210d82e16cf62b40120857e942d1721f390c7f Mon Sep 17 00:00:00 2001 From: leedom Date: Fri, 7 Apr 2023 12:33:09 +0800 Subject: [PATCH] update: resizeTextarea --- app/components/chat.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index b631d534e..b3b8fb01e 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -392,9 +392,7 @@ export function Chat(props: { const dom = inputRef.current; if (!dom) return; const { minRows, maxRows } = props.autoSize; - setTimeout(() => { - setTextareaStyle(calcTextareaHeight(dom, minRows, maxRows)); - }, 50); + setTextareaStyle(calcTextareaHeight(dom, minRows, maxRows)); }; // only search prompts when user input is short