From 8125c64e4617d2da98fc377d6f79125f24926856 Mon Sep 17 00:00:00 2001 From: "kl.nevermore" Date: Sat, 30 Dec 2023 06:07:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:ConfirmDialog=EF=BC=9AconfirmDialog=20metho?= =?UTF-8?q?d=20in=20unstyled=20mode,=20the=20pop-up=20window=20style=20not?= =?UTF-8?q?=20apply=20(#5658)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/lib/confirmdialog/ConfirmDialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/confirmdialog/ConfirmDialog.js b/components/lib/confirmdialog/ConfirmDialog.js index 1cd2ef1c22..0e66766158 100644 --- a/components/lib/confirmdialog/ConfirmDialog.js +++ b/components/lib/confirmdialog/ConfirmDialog.js @@ -33,8 +33,8 @@ export const ConfirmDialog = React.memo( const confirmProps = React.useRef(null); const isCallbackExecuting = React.useRef(false); const focusElementOnHide = React.useRef(null); - const getCurrentProps = () => confirmProps.current || props; - const getPropValue = (key) => (confirmProps.current || props)[key]; + const getCurrentProps = () => Object.assign(props, confirmProps.current); + const getPropValue = (key) => Object.assign(props, confirmProps.current)[key]; const callbackFromProp = (key, ...param) => ObjectUtils.getPropValue(getPropValue(key), param); const acceptLabel = getPropValue('acceptLabel') || localeOption('accept');