icflorescu / icflorescu/mantine-datatable
Resizing behaviour
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
The resizing behaviour is unexpected.
When changing the width of a column, I expect to only change the width of that particular column. At the moment, its sibling column is resized as well. I suppose this is to maintain the width of the table?
Anyway, the problem is that with multiple columns, it's easy to run to a point where it's impossible to resize columns more.
To Reproduce
This is the regular behaviour in all the examples. See this simple codesandbox for a more crammed table to experience the issues.
Expected behavior
I would expect to only adjust the width of the column being resized. The method is even available as setColumnWidth.
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 and trace the column-resizing path around setColumnWidth. Reproduce the behavior with multiple columns, especially in the crammed table, and identify why resizing one column also changes its sibling. Done means resizing one column changes only that column and the reproduction no longer becomes impossible to resize.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100