We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35785f3 commit f9e3ca1Copy full SHA for f9e3ca1
packages/runtime-dom/src/directives/vModel.ts
@@ -160,7 +160,7 @@ export const vModelCheckbox: ModelDirective<HTMLInputElement> = {
160
161
function setChecked(
162
el: HTMLInputElement,
163
- { value }: DirectiveBinding,
+ { value, oldValue }: DirectiveBinding,
164
vnode: VNode,
165
) {
166
// store the v-model value on the element so it can be accessed by the
@@ -177,7 +177,7 @@ function setChecked(
177
}
178
179
// Only update if the checked state has changed
180
- if (el.checked !== checked) {
+ if (el.checked !== checked && value !== oldValue) {
181
el.checked = checked
182
183
0 commit comments