feat: add attributes to the ModalAction

Add the onFinishAction and onCancelAction which are from the ListPage component to the ModalAction, add the modalProps to the ModalAction, these attritubes will make custom operations in the ModalAction to easily control the ListPage

Change-Id: Ibd81bc6331fa09a3c70fcfc6f1f72ccc3e6f9c37
This commit is contained in:
Jingwei.Zhang
2023-01-29 16:46:15 +08:00
parent d80c23b202
commit 2ebb26942a

View File

@@ -455,7 +455,15 @@ export class ActionButton extends Component {
if (!visible) {
return null;
}
const { title, action, item, containerProps, items } = this.props;
const {
title,
action,
item,
containerProps,
items,
onFinishAction,
onCancelAction,
} = this.props;
const ActionComponent = action;
const {
okText,
@@ -493,6 +501,9 @@ export class ActionButton extends Component {
items={items}
ref={this.formRef}
containerProps={containerProps}
onFinishAction={onFinishAction}
onCancelAction={onCancelAction}
modalProps={modalProps}
/>
</Modal>
);