Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 05afcb9

Browse files
hlomzikmakseq
andauthored
fix: DEV-1572: allow to uncheck single Choice (#452)
Co-authored-by: Max Tkachenko <[email protected]>
1 parent f97eb8d commit 05afcb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tags/control/Choice.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ const Model = types
7474
.actions(self => ({
7575
toggleSelected() {
7676
const choices = self.parent;
77+
const selected = self.sel;
7778

7879
choices.shouldBeUnselected && choices.resetSelected?.();
7980

80-
self.setSelected(!self.sel);
81+
self.setSelected(!selected);
8182

8283
choices.updateResult?.();
8384
},

0 commit comments

Comments
 (0)