Skip to content

Fix of checkedValue behavior in Knockout#1982

Merged
tomasherceg merged 1 commit intomainfrom
bug/checked-items-collection-update
Jan 9, 2026
Merged

Fix of checkedValue behavior in Knockout#1982
tomasherceg merged 1 commit intomainfrom
bug/checked-items-collection-update

Conversation

@tomasherceg
Copy link
Member

@tomasherceg tomasherceg commented Jan 1, 2026

We found an issue in the Business Pack GridView row selection mechanism, implemented using the CheckBox control. When the user switched to another page, the checkbox states were behaving weirdly.

I found out that it is actually a "feature" of Knockout - when a checkbox is checked and its checkedValue changes, it also updates the checkedItems collection to keep the checkbox checked.
I think this should not be done implicitly - if someone wants this behavior, they can update both checkedValue and checkedItems. This is consistent with other places in DotVVM where we typically keep "invalid" items in selected-item collections, since they may appear in the data source later.

I changed the behavior in our fork of Knockout (riganti/knockout#3) to apply only to DotVVM checkboxes.

@tomasherceg tomasherceg merged commit 4b47fed into main Jan 9, 2026
14 checks passed
@tomasherceg tomasherceg deleted the bug/checked-items-collection-update branch January 9, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants