feat(web): submit retrieval testing form on Enter, newline on Shift+Enter (#17741)

This commit is contained in:
euvre
2026-08-11 23:47:46 -07:00
committed by GitHub
parent f8b2b1248c
commit 6bf51925b3

View File

@@ -120,7 +120,15 @@ export default function TestingForm({
render={({ field }) => (
<FormItem>
<FormControl>
<Textarea {...field}></Textarea>
<Textarea
{...field}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
form.handleSubmit(onSubmit)();
}
}}
></Textarea>
</FormControl>
<FormMessage />