mirror of
https://github.com/hexastack/hexabot
synced 2025-05-06 05:44:37 +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) => {
|
onClose={async (result) => {
|
||||||
await closeDialog(promise, result);
|
await closeDialog(promise, result);
|
||||||
}}
|
}}
|
||||||
onSubmit={() => {}}
|
|
||||||
{...msgProps}
|
{...msgProps}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user