icflorescu / icflorescu/mantine-datatable
Column widths shrink as column count increases, causing cells to wrap unexpectedly
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
This one is simple so I will keep it brief.
When a table becomes horizontally scrollable due to many columns, auto-fit stops working and column widths progressively shrink, causing cell text to wrap.
To Reproduce
Just create a table with many columns.
Here's a codesandbox for convenience:
https://codesandbox.io/p/sandbox/mantine-datatable-resizable-forked-tmmy6g?file=%2Fsrc%2FApp.tsx%3A35%2C7
Expected behavior
Column widths should be completely unaffected by horizontal scrolling.
Cell wrapping should not occur.
Screenshots
Works fine (not horizontally scrollable):
Stops working as soon as it becomes horizontally scrollable (column widths start shrinking and cells wrap):
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 with the linked CodeSandbox reproduction, particularly src/App.tsx around line 35, and confirm the behavior with enough columns to trigger horizontal scrolling. Trace the table sizing and wrapping behavior from that example; done means column widths remain unchanged when scrolling is enabled and cell text no longer wraps unexpectedly.
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
- 45/100