Преглед изворни кода

fix: #1126 can not select prompt

Yidadaa пре 2 година
родитељ
комит
1aaf4ae5bc
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      app/components/chat.tsx

+ 1 - 1
app/components/chat.tsx

@@ -391,7 +391,7 @@ export function Chat() {
   const onPromptSelect = (prompt: Prompt) => {
     setPromptHints([]);
     inputRef.current?.focus();
-    setUserInput(prompt.content);
+    setTimeout(() => setUserInput(prompt.content), 60);
   };
 
   // auto grow input