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

[t-table] 当传入的selected-row-keys不在data中的话,select-change会将其在selectedRowData中作为undefined抛出 #3441

Closed
refanbanzhang opened this issue Dec 27, 2024 · 3 comments
Labels
need more info need more info to be published fixed, not be published

Comments

@refanbanzhang
Copy link

refanbanzhang commented Dec 27, 2024

tdesign-vue 版本

"tdesign-vue": "1.10.7"

重现链接

https://stackblitz.com/edit/dwerbjkx?file=src%2Fdemo.vue

重现步骤

1 传入selected-row-keys,保证其中有一个key不在data中
2 点击checkbox
3 在select-change中打印selectedRowData
4 观察selectedRowData,其中会有undefined元素

image

期望结果

期望不要将不存在的key元素作为undefind放进selectedRowData

实际结果

不存在的key元素作为undefind放进了selectedRowData

框架版本

"tdesign-vue": "1.10.7"

浏览器版本

Version 131.0.6778.205 (Official Build) (64-bit)

系统版本

win11

Node版本

v22.11.0

补充说明

No response

Copy link
Contributor

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

@uyarn
Copy link
Collaborator

uyarn commented Dec 30, 2024

是移除了某行数据导致的吗

@uyarn uyarn added the need more info need more info label Dec 30, 2024
@refanbanzhang
Copy link
Author

refanbanzhang commented Dec 31, 2024

是移除了某行数据导致的吗

不是,后台返回的selectedkeys,其中有些不存在于table第一页data中,就会导致select-change将其作为undefind抛出

@uyarn uyarn added the to be published fixed, not be published label Jan 8, 2025
@uyarn uyarn closed this as completed Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info need more info to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

2 participants