Skip to content

Commit

Permalink
fix: toggles always have a value
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Sep 14, 2023
1 parent 4c6d495 commit 72cfc3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/FormModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class FormModal extends Modal {
case "toggle":
return fieldBase.addToggle((toggle) => {
toggle.setValue(false);
this.formResult[definition.name] = false;
return toggle.onChange(async (value) => {
this.formResult[definition.name] = value;
});
Expand Down

0 comments on commit 72cfc3e

Please sign in to comment.