Skip to content

Commit

Permalink
fix(form): fix DrawerForm and ModalForm button error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Jan 18, 2024
1 parent 644967d commit 7bf4b30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/form/src/layouts/DrawerForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import React, {
import { createPortal } from 'react-dom';
import type { CommonFormProps, ProFormInstance } from '../../BaseForm';
import { BaseForm } from '../../BaseForm';
import { SubmitterProps } from '../../components/Submitter';
import { useStyle } from './style';

export type CustomizeResizeType = {
Expand Down Expand Up @@ -227,7 +228,10 @@ function DrawerForm<T = Record<string, any>, U = Record<string, any>>({
drawerProps?.onClose?.(e);
},
},
},
render: (_, dom) => {
return [...dom].reverse();
},
} as SubmitterProps,
rest.submitter,
);
}, [
Expand Down
6 changes: 5 additions & 1 deletion packages/form/src/layouts/ModalForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import React, {
import { createPortal } from 'react-dom';
import type { CommonFormProps, ProFormInstance } from '../../BaseForm';
import { BaseForm } from '../../BaseForm';
import { SubmitterProps } from '../../components/Submitter';

export type ModalFormProps<
T = Record<string, any>,
Expand Down Expand Up @@ -177,7 +178,10 @@ function ModalForm<T = Record<string, any>, U = Record<string, any>>({
modalProps?.onCancel?.(e);
},
},
},
render: (_, dom) => {
return [...dom].reverse();
},
} as SubmitterProps,
rest.submitter,
);
}, [
Expand Down

0 comments on commit 7bf4b30

Please sign in to comment.