Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(llm-schema-dialog): remove unnecessary event handler (#9463)

Hassieb Pakzadd953606e2f2c
diff --git a/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx b/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
index a749618ae6..843cc46f0c 100644
--- a/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
+++ b/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
@@ -95,13 +95,7 @@ export const CreateOrEditLLMSchemaDialog: React.FC<
}
}, [existingLlmSchema, form, props.defaultValues]);
- async function onSubmit(
- values: FormValues,
- event?: React.BaseSyntheticEvent,
- ) {
- event?.preventDefault();
- event?.stopPropagation();
-
+ async function onSubmit(values: FormValues) {
let result;
if (existingLlmSchema) {
result = await updateLlmSchema.mutateAsync({
@@ -171,8 +165,10 @@ export const CreateOrEditLLMSchemaDialog: React.FC<
<Form {...form}>
<form
onSubmit={(e) => {
+ e.preventDefault();
e.stopPropagation();
- form.handleSubmit(onSubmit)(e);
+
+ form.handleSubmit(onSubmit)();
}}
className="grid max-h-full min-h-0 overflow-hidden"
>