Browse Source

update: resizeTextarea

leedom 1 year ago
parent
commit
cb210d82e1
1 changed files with 1 additions and 3 deletions
  1. 1 3
      app/components/chat.tsx

+ 1 - 3
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