icflorescu / icflorescu/mantine-datatable

rows are cut off when printing

Open
#699 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
When printing very long tables, the header is automatically repeated on each page. (This is a browser feature, but it's universal among most browsers.) Since DataTable calculates its height without taking into account these extra header rows, the last (n-1) rows are cut off, where n is the number of pages in the printout.

To Reproduce
Steps to reproduce the behavior:

  1. Create a mantine-datatable with a couple hundred rows and standard table headers (column titles).
  2. Print the table. (You can't just use @media print emulation in the Inspector -- that will not paginate the results and therefore won't repeat the headers.)
  3. You'll see that rows are cut off from the end.

Expected behavior
All the rows should have been displayed on the printout.

Desktop (please complete the following information):

  • Windows 11
  • Tested on Chrome, Safari, Edge

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 by reproducing the issue with a mantine-datatable containing a couple hundred rows and printing it in Chrome, Safari, or Edge; inspect the table height calculation and print-specific behavior. Done means every row appears in the paginated printout, including when browser-repeated header rows are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.