We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c08b52f commit b97c9dbCopy full SHA for b97c9db
1 file changed
packages/module/src/WarningModal/WarningModal.tsx
@@ -44,7 +44,10 @@ const WarningModal: React.FunctionComponent<WarningModalProps> = ({
44
ouiaId="primary-confirm-button"
45
key="confirm"
46
variant={confirmButtonVariant}
47
- onClick={onConfirm}
+ onClick={() => {
48
+ onConfirm?.();
49
+ setChecked(false);
50
+ }}
51
isDisabled={withCheckbox && !checked}
52
>
53
{confirmButtonLabel}
@@ -64,7 +67,7 @@ const WarningModal: React.FunctionComponent<WarningModalProps> = ({
64
67
{withCheckbox ? (
65
68
<Checkbox
66
69
isChecked={checked}
- onChange={() => setChecked(!checked)}
70
+ onChange={(_event, value) => setChecked(value)}
71
label={checkboxLabel}
72
id="warning-modal-check"
73
className="pf-v5-u-mt-lg"
0 commit comments