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 getRowKey 索引index 为undefined #1108

Open
hairgc opened this issue Apr 17, 2024 · 0 comments
Open

虚拟滚动时,table getRowKey 索引index 为undefined #1108

hairgc opened this issue Apr 17, 2024 · 0 comments

Comments

@hairgc
Copy link

hairgc commented Apr 17, 2024

使用虚拟滚动时,设置rowKey有个特殊处理,当唯一值id不存在时,使用索引index代替

rowKey = {(record, index)=>(record?.id || index )}

但索引打印为undefined

看了是因为虚拟滚动Table内部使用rc-virtual-list组件时未传递index,建议支持下索引,或者直接在Table rowKey移除对index的支持,否则使用时容易出现bug

itemKey={item => getRowKey(item.record)}

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

1 participant