DataTables / DataTables/Select
When deselecting multiple rows the last one is not getting unselected
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Hi.
Playing around with the plugin I noticed that when deselecting multiple items the last one remains selected.
I dug a bit into the code and noticed the following code that intentionally prevents the last row from being deselected.
https://github.com/DataTables/Select/blob/36e53e42f5220e98879d2554551aabbfaba7d0ff/js/dataTables.select.js#L695-L697
I checked the behavior of many programs and none acts like that.
Can you please explain the reasoning behind it?
Anyway I believe that this behavior should be configurable what is yours?
Thanks.
Contributor guide
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
Start in js/dataTables.select.js around lines 695-697 and reproduce deselecting multiple rows to confirm the final row remains selected. Clarify whether the default behavior should change or be configurable, then verify that the chosen behavior consistently deselects the intended rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100