mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
fix: Hitting 'Enter' submits, but creates a newline
This commit is contained in:
parent
f7b1341b30
commit
07b639630a
1 changed files with 3 additions and 0 deletions
|
|
@ -345,6 +345,7 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) {
|
|||
onChange: onValueChange,
|
||||
onKeyDown: (e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
onSend();
|
||||
}
|
||||
},
|
||||
|
|
@ -389,6 +390,7 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) {
|
|||
onChange: (e) => setValue(e.target.value),
|
||||
onKeyDown: (e) => {
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
onSend();
|
||||
}
|
||||
},
|
||||
|
|
@ -508,6 +510,7 @@ export function Chat({
|
|||
onChange: onValueChange,
|
||||
onKeyDown: (e) => {
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
askQuestion();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue