icflorescu / icflorescu/mantine-datatable
rows are cut off when printing
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:
- Create a mantine-datatable with a couple hundred rows and standard table headers (column titles).
- 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.)
- 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
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 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