icflorescu / icflorescu/mantine-datatable

`maxWidth` property for columns

Open
#744 0 comments 0 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

Is your feature request related to a problem? Please describe.
I often need to limit the maximum width of a column.
Currently, setting width is not ideal because it enforces a fixed width, even when the cell content is short.

A maxWidth option would allow the column to shrink naturally when possible, but also cap its growth.
This would pair perfectly with the ellipsis property, so long text can be truncated with ellipses once the max width is reached.

Describe the solution you'd like
A maxWidth property on DataTableColumn. This would let the column shrink when space allows, but still prevent it from stretching too wide.

Describe alternatives you've considered

  • Using width (but this forces a fixed width, which isn't flexible enough).
  • Custom cell renderers with inline styles (repetitive and error-prone).

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

Locate the DataTableColumn definition and the existing width and ellipsis handling. Trace how column sizing is applied, then verify that a maxWidth option allows columns to shrink naturally while capping their growth and works with ellipsis for long content.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
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.