We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35785f3 commit ab185e8Copy full SHA for ab185e8
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
@@ -173,6 +173,7 @@ function setChecked(
173
} else if (isSet(value)) {
174
checked = value.has(vnode.props!.value)
175
} else {
176
+ if (value === oldValue) return
177
checked = looseEqual(value, getCheckboxValue(el, true))
178
}
179
0 commit comments