Knockout-Contrib / Knockout-Contrib/KoGrid

selectedItems not cleared when emptying selectedItems array

Open
#296 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
277
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Currently the scenario I have is that I want to persist selections between pages, I want to reset when they change page count or filter.

However if I call `removeAll()` on the observable array being used it empties and the table says 0 records but the rows are still highlighted. Also when I move between pages it says that there are 0 selections but the rows are still highlighted.

So I assume there is a disconnect between the number reported, the rows highlighted and the observable array being used.

So what is the correct way to manage the state of the selectedItems so everything stays in line?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with an observable selectedItems array, calling removeAll(), and changing pages or filters. Trace how the selectedItems count and row highlighting respond; done means clearing the array and changing pages or filters leave zero selections and no highlighted rows.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.