Knockout-Contrib / Knockout-Contrib/KoGrid
self.sortData has javascript error 'sortInfo is not defined' in 2 spots
- Dominant language
- JavaScript
- Stars
- 277
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
``` javascript
self.sortData = function (col, direction) {
// if external sorting is being used, do nothing.
self.isSorting = true;
self.sortInfo({
column: col,
direction: direction
});
self.clearSortingData(col);
if(!self.config.useExternalSorting){
window.kg.sortService.Sort(sortInfo, self.sortedData);
} else {
self.config.sortInfo(sortInfo);
}
self.lastSortedColumn = col;
self.isSorting = false;
};
```
The sortInfo variable is not defined and therefore throws a javascript Uncaught ReferenceError: sortInfo is not defined. You can see it in the following fiddle as well - http://jsfiddle.net/zSpMh/2/ after you try sorting the first column.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the self.sortData function shown in the issue and reproduce the failure by sorting the first column using the linked fiddle. Trace how sort information is created and consumed in both sorting branches, then verify that sorting no longer raises the reported ReferenceError.
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
- 45/100