Knockout-Contrib / Knockout-Contrib/KoGrid
With multiselect off, after sorting, the last selected row remains highlighted.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 277
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction:
- grid with some data, selectedItems bound (doesn't have to be), multiSelect off.
- select a row
- sort the grid on a different column
- select a new row
What's expected:
Previous row is deselected, new row is now active
What's happening:
Previous row is removed from selectedItems, but remains highlighted.
New row is added to selectedItems, and highlighted as well.
I haven't been able to properly debug, but I suppose the lastClickedRow no longer refers to the visible row after sorting, since sorting sets the data context variable to the newly sorted dataset and therefor triggers a redraw?
Sander
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a grid using single selection, then trace the selection state around sorting and redraws, especially selectedItems and lastClickedRow. Verify that selecting a new row after sorting removes the previous highlight and leaves only the new row active, matching the expected 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
- Mostly clear
- Newbie friendliness
- 45/100