diff --git a/packages/module/src/WarningModal/WarningModal.tsx b/packages/module/src/WarningModal/WarningModal.tsx index 371ddc6b..341b5330 100644 --- a/packages/module/src/WarningModal/WarningModal.tsx +++ b/packages/module/src/WarningModal/WarningModal.tsx @@ -44,7 +44,10 @@ const WarningModal: React.FunctionComponent = ({ ouiaId="primary-confirm-button" key="confirm" variant={confirmButtonVariant} - onClick={onConfirm} + onClick={() => { + onConfirm?.(); + setChecked(false); + }} isDisabled={withCheckbox && !checked} > {confirmButtonLabel} @@ -64,7 +67,7 @@ const WarningModal: React.FunctionComponent = ({ {withCheckbox ? ( setChecked(!checked)} + onChange={(_event, value) => setChecked(value)} label={checkboxLabel} id="warning-modal-check" className="pf-v5-u-mt-lg"