icflorescu / icflorescu/mantine-datatable
`maxWidth` property for columns
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
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
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