Knockout-Contrib / Knockout-Contrib/KoGrid

isAggCol is not being considered in the column def

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

Hello there,

I was trying to use isAggCol property and I found a couple of issues with it:

In the function window.kg.Column the line self.isAggCol = config.isAggCol; is not taking into consideration the property isAggCol in the Column Defs. So I changed to the following code: self.isAggCol = colDef.isAggCol;
In the computed field nonAggColumns that is used for the menu, the filter should be the opposite. Instead of !col.isAggCol; it should be col.isAggCol

```
self.nonAggColumns = ko.computed(function () {
return self.columns().filter(function (col) {
return col.isAggCol;
});
});
```

Anyhow, that ended up working for me. Let me know if this is the proper way.

Regards,

Augusto

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the window.kg.Column function and the computed nonAggColumns field, then inspect how column definitions populate isAggCol and how the menu filters columns. Verify the intended behavior with the existing test suite, if present; done means column-definition values are honored and the menu includes the correct columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.