Description
Vue version
3.2
Link to minimal reproduction
Steps to reproduce
click the checkbox. observe the {{cls}} value change and the checkbox not checking. If you remove {{cls}} from the template the box will check.
What is expected?
The view re renders with the updated string ref {{cls}} and the checkbox is checked.
What is actually happening?
click the checkbox. observe the cls value change and the checkbox not checking. If you remove {{cls}} from the template the box will check.
System Info
multiple systems / OS's
Any additional comments?
potentially related to this issue:
#8579
Explanation of cause from a member in the vue discord channel:
Clicking on the checkbox sets the checked state of the checkbox to true.
The click event happens.
Vue re-renders. The data bound to the v-model hasn't been updated yet, so when it re-renders the checkbox it sets it back to unchecked.
The change event happens, triggering the v-model. But that performs the update based on the current value of the checked property, which is now back to false.