fix(frontend): resolve onSubmit issue

This commit is contained in:
yassinedorbozgithub 2025-02-07 11:38:36 +01:00
parent 937e0e9302
commit 5c057409b7
2 changed files with 2 additions and 3 deletions

View File

@ -137,7 +137,6 @@ function DialogsProvider(props: DialogProviderProps) {
onClose={async (result) => { onClose={async (result) => {
await closeDialog(promise, result); await closeDialog(promise, result);
}} }}
onSubmit={() => {}}
{...msgProps} {...msgProps}
/> />
))} ))}

View File

@ -52,7 +52,7 @@ export interface DialogProps<P = undefined, R = void> {
*/ */
onClose: (result: R) => Promise<void>; onClose: (result: R) => Promise<void>;
onSubmit: (e: BaseSyntheticEvent) => void; onSubmit?: (e: BaseSyntheticEvent) => void;
} }
export type DialogComponent<P, R> = React.ComponentType<DialogProps<P, R>>; export type DialogComponent<P, R> = React.ComponentType<DialogProps<P, R>>;
@ -157,7 +157,7 @@ export interface FormDialogProps
// form // form
export interface FormButtonsProps { export interface FormButtonsProps {
onSubmit: (e: BaseSyntheticEvent) => void; onSubmit?: (e: BaseSyntheticEvent) => void;
onCancel?: () => void; onCancel?: () => void;
cancelButtonProps?: ButtonProps; cancelButtonProps?: ButtonProps;
confirmButtonProps?: ButtonProps; confirmButtonProps?: ButtonProps;