From 2ebb26942a6e1e92de8d5d890cc4f3dfe0b40df4 Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Sun, 29 Jan 2023 16:46:15 +0800 Subject: [PATCH] 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 --- src/components/Tables/Base/ActionButton/index.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/Tables/Base/ActionButton/index.jsx b/src/components/Tables/Base/ActionButton/index.jsx index c18cbc7a..57578344 100644 --- a/src/components/Tables/Base/ActionButton/index.jsx +++ b/src/components/Tables/Base/ActionButton/index.jsx @@ -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} /> );