Skip to content

Commit 11358e3

Browse files
authored
fix: resolve onError type conflict in PromptInputProps (#132)
Exclude "onError" from HTMLAttributes<HTMLFormElement> to prevent conflict with the custom onError callback that provides specific file upload error codes ("max_files", "max_file_size", "accept").
1 parent fda2d1c commit 11358e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/elements/src/prompt-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ export type PromptInputMessage = {
418418

419419
export type PromptInputProps = Omit<
420420
HTMLAttributes<HTMLFormElement>,
421-
"onSubmit"
421+
"onSubmit" | "onError"
422422
> & {
423423
accept?: string; // e.g., "image/*" or leave undefined for any
424424
multiple?: boolean;

0 commit comments

Comments
 (0)