Knockout-Contrib / Knockout-Contrib/KoGrid

Lost selected items on filter

Open
#314 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

Hi, I'm using KoGrid 2.1.1 , with knockout-3.4.1.
I declared 2 observable arrays in my model:

```
self.Siti = ko.observableArray([]);
self.SitiSelezionati= ko.observableArray([]);
```

I popolated "Sites" with "complex" object:

```
function sitoObject(_id, _titolo, _url, _gruppoReader) {
var self = this;
self.Id = ko.observable(_id);
self.Titolo = ko.observable(_titolo);
self.Url = ko.observable(_url);
self.GruppoReader = ko.observable(_gruppoReader);
}
```

I declared KoGrid:

```


```

The items are correctly loaded, If I click an item the grid put it in "SitiSelezionati" array, but when I apply the filter on the grid, I loose previous selected item.

What am I doing wrong?

thanks for support!

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with KoGrid 2.1.1 and knockout-3.4.1 using the shown koGrid binding, observable arrays, filtering, and multi-selection. Trace how filtering updates selectedItems; done when selections made before filtering remain in SitiSelezionati afterward, with a regression test covering the behavior.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.