From 90051961ffbe1e2327977c10b7c84ae08ed621cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Herceg?= Date: Thu, 1 Jan 2026 12:28:48 +0100 Subject: [PATCH] Modified behavior for checkedValue changes in DotVVM checkboxes --- src/binding/defaultBindings/checked.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/binding/defaultBindings/checked.js b/src/binding/defaultBindings/checked.js index 31f28d060..3f0d3b730 100755 --- a/src/binding/defaultBindings/checked.js +++ b/src/binding/defaultBindings/checked.js @@ -50,7 +50,10 @@ ko.bindingHandlers['checked'] = { // When we're responding to the checkedValue changing, and the element is // currently checked, replace the old elem value with the new elem value // in the model array. - if (isChecked) { + if (isChecked + // we want to suppress this behavior in DotVVM - it will applies only to non-DotVVM checkboxes + && !allBindings['has']('checkedArrayContainsObservables') + ) { ko.utils.addOrRemoveItem(writableValue, elemValue, true, checkedArrayContainsObservables, checkedValueComparer); ko.utils.addOrRemoveItem(writableValue, saveOldValue, false, checkedArrayContainsObservables, checkedValueComparer); }