Skip to content

Commit

Permalink
netteForms: fixed toggle bug in e1fbd7c [Closed #331]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 7, 2024
1 parent 4419263 commit 2ceb5bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nette-forms",
"version": "3.4.0",
"version": "3.4.1",
"description": "Client side script for Nette Forms Component",
"keywords": [
"nette",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/netteForms.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,8 @@
});
}
for (let id in rule.toggle ?? []) {
formToggles[id] ??= {elem: elem, state: rule.toggle[id] ? curSuccess : !curSuccess};
formToggles[id] ??= {elem: elem};
formToggles[id].state ||= rule.toggle[id] ? curSuccess : !curSuccess;
}
}
}
Expand Down
Loading

0 comments on commit 2ceb5bd

Please sign in to comment.