icflorescu / icflorescu/mantine-datatable

Column widths shrink as column count increases, causing cells to wrap unexpectedly

Open
#779 2 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
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):
Image

Stops working as soon as it becomes horizontally scrollable (column widths start shrinking and cells wrap):
Image

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.