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.resizable=false和resize.minWidth, resize.maxWidth不能限制住列宽 #1765

Closed
LoopZhou opened this issue Nov 10, 2022 · 8 comments
Assignees
Labels
🐞 bug Something isn't working 🏃🏻 in progress someone is handling

Comments

@LoopZhou
Copy link
Collaborator

tdesign-vue 版本

0.49.3

重现链接

https://codesandbox.io/s/tdesign-vue-demo-forked-td3sd8?file=/src/demo.vue

重现步骤

目前列配置的columns.resizable=false和resize.minWidth, resize.maxWidth并不能限制住该列列宽。
目前只有拖动该列右边线时,计算限制了该列宽,拖动该列左边线时依旧会造成列宽改变。

2022-11-10.09.45.00.mov

期望结果

希望有方案可以限制某列宽度, minWidth和maxWidth可以限制列宽范围

实际结果

目前拖动该列左边线会造成列宽变动。

框架版本

Vue(2.6.0)

浏览器版本

Chrome(99.0.4844.51)

系统版本

MacOS(10.15.7)

Node版本

12.22.0

补充说明

No response

@github-actions
Copy link
Contributor

👋 @LoopZhou,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2022

♥️ 有劳 @realyuyanan @chaishi @cool-518 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @LoopZhou

@chaishi
Copy link
Collaborator

chaishi commented Nov 10, 2022

如果都已经 columns.resizable=false 时,为什么还要 resize.maxWidth ?

resizable = false,意味着禁用调整宽度特性,此时设置 resize.maxWidth 没有意义

@LoopZhou
Copy link
Collaborator Author

指设置了columns.resizable=false 不调整当前列列宽 或者 设置了resize.maxWidth, resize.minWidth限制拖动范围两种情况。
image

@chaishi
Copy link
Collaborator

chaishi commented Nov 14, 2022

columns.resizable=false 是指不能通过当前列调整宽度,而非 「不调整当前列列宽」

@ZTao-z
Copy link
Contributor

ZTao-z commented Nov 14, 2022

  1. columns.resizable=false 指当前列不支持调整列宽;
  2. minWidth,maxWidth作用在主动调整列宽的时候,被动调整的列没有限制
  3. 可以考虑把fixed列的前一列设置column.resizable=false做限制,确保设置为fixed的列不会受到相邻列列宽调整的影响

@chaishi chaishi added the 💭 discussion we are discussing label Jan 7, 2023
@chaishi chaishi added 🐞 bug Something isn't working 🏃🏻 in progress someone is handling and removed 💭 discussion we are discussing labels Feb 12, 2023
@chaishi
Copy link
Collaborator

chaishi commented Feb 12, 2023

columns.resizable=false resolved in #2130

@chaishi chaishi changed the title [table] 列宽拖拽功能,列配置的columns.resizable=false和resize.minWidth, resize.maxWidth并不能限制住列宽 [table] 列宽拖拽功能,列配置的columns.resizable=false和resize.minWidth, resize.maxWidth不能限制住列宽 Feb 12, 2023
@chaishi
Copy link
Collaborator

chaishi commented Feb 12, 2023

columns.resizable=false 和 resize.minWidth 已经支持调整的当前列宽度限制,至于受影响的其他列暂未支持。后续单独提 issue 支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🏃🏻 in progress someone is handling
Projects
None yet
Development

No branches or pull requests

4 participants