Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table 组件的columns中添加列属性 maxWidth、minWidth #2874

Closed
1 task
beenqi opened this issue Sep 21, 2020 · 4 comments
Closed
1 task

Table 组件的columns中添加列属性 maxWidth、minWidth #2874

beenqi opened this issue Sep 21, 2020 · 4 comments

Comments

@beenqi
Copy link

beenqi commented Sep 21, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

目前,当一列内容过多时会无限侵占其他列的宽度,希望能添加最大宽的属性来限制列最宽的情况

What does the proposed API look like?

columns = [

{
title: '项目描述',
dataIndex: 'projectDesc',
maxWidth: '400px',
minWidth: '100px',
}
]

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Dec 11, 2020
@imic07
Copy link

imic07 commented Dec 15, 2020

建议增加一个属性 宽度是否允许自动变化 allowWidthChange:true/false。
功能是:当列设置了width/allowWidthChange=false后, 此列就按照设定的width显示,不要再根据每列的width比例去动态变化。没有设置allowWidthChange的列或者allowWidthChange=true就按照 (当前表格总宽度 - 有allowWidthChange的总宽度)按比例放大。

建议每个列都设定一个width(每列都设定了width可以提高性能),allowWidthChange根据需要设置。

这种设置相对于minWidth、maxWidth 更好理解。

@github-actions github-actions bot removed the Stale label Dec 16, 2020
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants