Knockout-Contrib / KoGrid

A Knockout DataGrid

Home Page:https://knockout-contrib.github.io/KoGrid/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

selectedItems not cleared when emptying selectedItems array

grofit opened this issue · comments

commented

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?