From c286d98446f3d115af94f4256b519395ff840053 Mon Sep 17 00:00:00 2001 From: ybaskaran <34709414+ybaskaran@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:14:36 +0100 Subject: [PATCH] fix(TDOPS-5582/designSystem): checkbox state change on click (#4976) * fix(TDOPS-5582/designSystem): checkbox state change on click * fix(TDOPS-5582/designSystem): checkbox state change on click --- .changeset/serious-toes-remember.md | 5 +++++ .../src/components/Form/Field/Input/Input.ToggleSwitch.tsx | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/serious-toes-remember.md diff --git a/.changeset/serious-toes-remember.md b/.changeset/serious-toes-remember.md new file mode 100644 index 00000000000..9794f9001b4 --- /dev/null +++ b/.changeset/serious-toes-remember.md @@ -0,0 +1,5 @@ +--- +'@talend/design-system': patch +--- + +fix(TDOPS-5582/designSystem): checkbox state change on click diff --git a/packages/design-system/src/components/Form/Field/Input/Input.ToggleSwitch.tsx b/packages/design-system/src/components/Form/Field/Input/Input.ToggleSwitch.tsx index a3990b7420b..080884228f1 100644 --- a/packages/design-system/src/components/Form/Field/Input/Input.ToggleSwitch.tsx +++ b/packages/design-system/src/components/Form/Field/Input/Input.ToggleSwitch.tsx @@ -33,6 +33,7 @@ export const ToggleSwitch = forwardRef( onChangeKey: 'onChange', valueKey: 'checked', defaultValueKey: 'defaultChecked', + selector: e => e.target.checked, defaultValue: false, });