diff --git a/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx b/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx index c1b649e8..d96f6bbd 100644 --- a/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx +++ b/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx @@ -32,6 +32,14 @@ export const ResetPasswordScreen: React.FC = (props) = const passwordRef = useRef(null); const confirmRef = useRef(null); const { triggerError, errorManagerConfig } = useErrorManager(); + const errorDisplayConfig = { + ...errorManagerConfig, + ...props.errorDisplayConfig, + onClose: (): void => { + if (props.errorDisplayConfig && props.errorDisplayConfig.onClose) props.errorDisplayConfig.onClose(); + if (errorManagerConfig.onClose) errorManagerConfig?.onClose(); + }, + }; const { WorkflowCardBaseProps, @@ -39,7 +47,6 @@ export const ResetPasswordScreen: React.FC = (props) = WorkflowCardInstructionProps, WorkflowCardActionsProps, PasswordProps, - errorDisplayConfig = errorManagerConfig, slots = {}, slotProps = {}, } = props; @@ -148,6 +155,8 @@ export const ResetPasswordScreen: React.FC = (props) = passwordRef, confirmRef, ...PasswordProps, + initialNewPasswordValue: passwordInput, + initialConfirmPasswordValue: confirmInput, onPasswordChange: (passwordData: { password: string; confirm: string }): void => { updateFields(passwordData); PasswordProps?.onPasswordChange?.(passwordData);