镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Description

@hairgc

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

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

但索引打印为undefined

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions