[Feature] column指定minWidth时,widthMode为adaptive希望根据minWidth均分剩余空间
Open
Nobody has claimed this yet.
feature
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
What problem does this feature solve?
column配置width时,可以按比例均分剩余空间,但是当配置为minWidth时,无法均分
https://codesandbox.io/p/sandbox/ygj9w7?file=%2Fsrc%2FApp.js%3A8%2C7-8%2C15
What does the proposed API look like?
const option = {
columns: [
{
field: "0",
title: "name",
minWidth: 100,
},
{
field: "1",
title: "age",
minWidth: 100,
},
{
field: "2",
title: "gender",
minWidth: 100,
},
{
field: "3",
title: "hobby",
minWidth: 100,
},
],
widthMode: "adaptive",
records: new Array(1000).fill(["John", 18, "male", "🏀"]),
};
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
Reproduce the behavior in the linked CodeSandbox using widthMode: "adaptive" and columns with minWidth. Trace the adaptive column-sizing entry point to determine how remaining space is distributed, then verify that equal minWidth columns share that space as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100