From 2874e8ac45d56cdde2f70a65157d7c3f586f91fb Mon Sep 17 00:00:00 2001 From: Melloware Date: Fri, 5 Jan 2024 18:14:55 -0500 Subject: [PATCH] Fix #5697: Revert ConfirmDialog fix (#5698) --- 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 0e66766158..1cd2ef1c22 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 = () => Object.assign(props, confirmProps.current); - const getPropValue = (key) => Object.assign(props, confirmProps.current)[key]; + const getCurrentProps = () => confirmProps.current || props; + const getPropValue = (key) => (confirmProps.current || props)[key]; const callbackFromProp = (key, ...param) => ObjectUtils.getPropValue(getPropValue(key), param); const acceptLabel = getPropValue('acceptLabel') || localeOption('accept');