mirror of
https://github.com/hexastack/hexabot
synced 2025-05-06 13:54:45 +00:00
fix(frontend): resolve onSubmit issue
This commit is contained in:
parent
937e0e9302
commit
5c057409b7
@ -137,7 +137,6 @@ function DialogsProvider(props: DialogProviderProps) {
|
||||
onClose={async (result) => {
|
||||
await closeDialog(promise, result);
|
||||
}}
|
||||
onSubmit={() => {}}
|
||||
{...msgProps}
|
||||
/>
|
||||
))}
|
||||
|
@ -52,7 +52,7 @@ export interface DialogProps<P = undefined, R = void> {
|
||||
*/
|
||||
onClose: (result: R) => Promise<void>;
|
||||
|
||||
onSubmit: (e: BaseSyntheticEvent) => void;
|
||||
onSubmit?: (e: BaseSyntheticEvent) => void;
|
||||
}
|
||||
|
||||
export type DialogComponent<P, R> = React.ComponentType<DialogProps<P, R>>;
|
||||
@ -157,7 +157,7 @@ export interface FormDialogProps
|
||||
|
||||
// form
|
||||
export interface FormButtonsProps {
|
||||
onSubmit: (e: BaseSyntheticEvent) => void;
|
||||
onSubmit?: (e: BaseSyntheticEvent) => void;
|
||||
onCancel?: () => void;
|
||||
cancelButtonProps?: ButtonProps;
|
||||
confirmButtonProps?: ButtonProps;
|
||||
|
Loading…
Reference in New Issue
Block a user