Knockout-Contrib / Knockout-Contrib/KoGrid
Issues with updating data and maintaining selections
- Dominant language
- JavaScript
- Stars
- 277
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
We have a single-selectable grid bound to a data source that can be added to by a user action.
If there is a row already selected when the data is modified ( ie new row pushed into array ) then the grid loses track of what was selected the previously selected row remains selected if another row is click on.
Here is a jsFiddle to demonstrate the issue : http://jsfiddle.net/slaneyrw/gdXY4/
I have tracked the problem down to the SelectionService and the lastClickedRow variable still being set to an orphaned Row instance ( all the row instances are rebuilt when the source data is modified ).
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the selection behavior with the linked jsFiddle, then inspect the SelectionService and its lastClickedRow handling when source data is modified. Verify that adding a row preserves the existing selection and that clicking another row does not leave the previously selected row selected.
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