Knockout-Contrib / Knockout-Contrib/KoGrid
Total Items is 1 even if there are no rows
- Dominant language
- JavaScript
- Stars
- 277
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
Kogrid will display total items of 1 in the footer even if the number of rows in the grid is 0. I think I have nailed it down to this piece of code:
``` javascript
self.maxRows = ko.observable(Math.max(self.config.pagingOptions.totalServerItems() || self.sortedData().length, 1));
```
Why is maxRows defaulted to 1?
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the KoGrid codebase for the maxRows assignment shown in the issue and trace how it feeds the footer's total-items display. Reproduce an empty grid, then verify that the footer reports zero items without changing the behavior for grids containing rows.
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
- Mostly clear
- Newbie friendliness
- 35/100