From f392259e3f7696227ab4989d601b428adf93dd61 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Sat, 21 Dec 2024 00:55:39 +0100 Subject: [PATCH] FIX: correclty allows to untoggle a fk toggle (#30404) --- .../app/form-kit/components/fk/control/toggle.gjs | 2 +- .../components/form-kit/controls/toggle-test.gjs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/form-kit/components/fk/control/toggle.gjs b/app/assets/javascripts/discourse/app/form-kit/components/fk/control/toggle.gjs index a2c342e7d46..7c84e3f5f82 100644 --- a/app/assets/javascripts/discourse/app/form-kit/components/fk/control/toggle.gjs +++ b/app/assets/javascripts/discourse/app/form-kit/components/fk/control/toggle.gjs @@ -8,7 +8,7 @@ export default class FKControlToggle extends Component { @action handleInput() { - this.args.field.set(!this.args.value); + this.args.field.set(!this.args.field.value); }