DataTables / DataTables/Select

Header select checkbox does not fire user-select event

Open
#59 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
44
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Have some code that I need to know if the user checked or the API changed the selection
This event all works on the row selection, but does not fire when clicking the header checkbox

Due to the event.stopPropagation on the click event, I have no way to detect when this header checkbox is clicked

dTable.on('user-select', function (e, dt, type, cell, originalEvent) {
// fires on user rows but not on header
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the dTable.on('user-select', ...) entry point and trace how row selection differs from the header checkbox click, including the event.stopPropagation behavior. Done means a user-triggered header selection can be detected without confusing it with API-driven selection, with the existing row-selection behavior preserved.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.