DataTables / DataTables/Dist-DataTables-Bootstrap5
Select All checkbox in table header is misaligned with table rows
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 21
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Using the latest datatables.net-dt and datatables.net-bs5 packages (v2.3.2), when the DataTable.render.select() checkbox is rendered, the Select All checkbox in the header is slightly out of alignment with the checkboxes in the table rows:
The cause appears to be the display of the <span class="dt-column-order"></span> element and the styling attached to div.dt-column-header, which is:
This causes .dt-column-order to affect the layout. I see there's special handling for span.dt-column-title:empty so perhaps that needs to be extended to .dt-column-order:empty as well.
Example table:
new DataTable('#table', {
columns: [{ orderable: false, render: DataTable.render.select() }],
select: {
style: 'multi', // but affects other styles like `os` too
},
});
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
Start in css/dataTables.bootstrap5.css around lines 155-158 and inspect the styling on div.dt-column-header, span.dt-column-title:empty, and .dt-column-order. Reproduce the provided DataTable.render.select() example with datatables.net-dt and datatables.net-bs5 v2.3.2, then adjust the empty-header layout so the Select All checkbox aligns with row checkboxes without disrupting other select styles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100