From d5b58ac16dfe20b6173893c92937aa102abdee40 Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Thu, 7 Sep 2023 10:25:18 +0800 Subject: [PATCH] feat: add action props to ModalAction component add action props to ModalAction component, then can use the action static props for the instance function Change-Id: Ib22120105deb30f108218d040fc1fc33f88b39bc --- src/components/Tables/Base/ActionButton/index.jsx | 1 + src/containers/Action/ModalAction/index.jsx | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/components/Tables/Base/ActionButton/index.jsx b/src/components/Tables/Base/ActionButton/index.jsx index 13e18338..a883b6f0 100644 --- a/src/components/Tables/Base/ActionButton/index.jsx +++ b/src/components/Tables/Base/ActionButton/index.jsx @@ -537,6 +537,7 @@ export class ActionButton extends Component { onFinishAction={onFinishAction} onCancelAction={onCancelAction} modalProps={modalProps} + action={action} /> ); diff --git a/src/containers/Action/ModalAction/index.jsx b/src/containers/Action/ModalAction/index.jsx index 695b1ca0..aa3ee72b 100644 --- a/src/containers/Action/ModalAction/index.jsx +++ b/src/containers/Action/ModalAction/index.jsx @@ -158,6 +158,11 @@ export default class ModalAction extends BaseForm { return (this.item || {}).id; } + get actionId() { + const { action } = this.props; + return action?.id; + } + get items() { const { items } = this.props; return items;