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] table中rowKey建议增加function 和 string两种类型 #1353

Closed
luchuanqi opened this issue Aug 23, 2022 · 11 comments
Closed

[table] table中rowKey建议增加function 和 string两种类型 #1353

luchuanqi opened this issue Aug 23, 2022 · 11 comments
Assignees

Comments

@luchuanqi
Copy link
Contributor

luchuanqi commented Aug 23, 2022

这个功能解决了什么问题

rowKey绑定id,当做update操作时,列表不更新。 只能清空data, 然后再次重绘列表

你建议的方案是什么

建议增加function 和 string两种类型

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 23, 2022

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

@chaishi
Copy link
Collaborator

chaishi commented Aug 23, 2022

自己处理下数据吧,不也复杂,就一行代码的事情,
组件里面也是一个 .map

@luchuanqi
Copy link
Contributor Author

但是长列表的时候,这个会导致列表重绘。 用户体验有点差

@uyarn uyarn added the wontfix This will not be worked on label Aug 26, 2022
@chaishi
Copy link
Collaborator

chaishi commented Sep 5, 2022

长列表的时候是什么时候,如果存在 data 的变化,无论是否 map,都会重绘

@luchuanqi
Copy link
Contributor Author

key不变, 是不会重新渲染的。 其他table组件,都会加上function类型的, 就是回避只update一个数据,整个列表都要重新渲染

@chaishi
Copy link
Collaborator

chaishi commented Sep 5, 2022

但是长列表的时候,这个会导致列表重绘。 用户体验有点差

是开发体验差,还是用户体验差,录个屏我看下有多差

@chaishi
Copy link
Collaborator

chaishi commented Sep 5, 2022

rowKey绑定id,当做update操作时,列表不更新。 只能清空data, 然后再次重绘列表

如果是 Vue2,我记得是有个方法单独更新的 Vue.$set(xxx, xxx) 或者 this.$set(data[i], 'field', 'newValue')

@luchuanqi
Copy link
Contributor Author

table下面是tree

@chaishi chaishi removed the wontfix This will not be worked on label Oct 15, 2022
@chaishi
Copy link
Collaborator

chaishi commented Oct 30, 2022

下个月安排

@ccccpj ccccpj added the 💪🏻 enhancement New feature or request label Feb 14, 2023
@chaishi
Copy link
Collaborator

chaishi commented Jul 22, 2023

十分抱歉,时间有限,且有其他的解决方案,暂不支持。

@chaishi chaishi removed the 💪🏻 enhancement New feature or request label Feb 25, 2024
@chaishi chaishi closed this as completed Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants