CheckBox becomes unresponsive to having its checked property set after being manually toggled #7217
Unanswered
adamski234
asked this question in
Q&A
Replies: 1 comment 1 reply
-
That's because when a value is changed, its binding is broken. checked <=> root.toggled; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is the smallest replicable sample of this issue I was able to create. One caveat regarding this snippet: a two-way binding solves this issue, however that does not work for my use case, since I go through a model and they don't support two-way bindings, hence the callback usage.
What happens:
root.toggled
andcbox.checked
. The string at the bottom reflects this.root.toggled
is updated via thetoggled
callback from the CheckBox.root.toggled
is changed,cbox.checked
does not change.What I expect to happen:
At step 3, pressing the button again does toggle the CheckBox, setting
root.toggled
and that being reflected incbox.checked
due to the binding.Is this behavior expected and I am simply misunderstanding the language, or is this a bug? As far as I can tell, based on the Binding section of the Reactivity page of the documentation, updating
root.toggled
should updatecbox.checked
. The CheckBox page does not mention anything about the bindings being removed on a manual toggle.Beta Was this translation helpful? Give feedback.
All reactions