跳转到内容
搜索文档

RtkVirtualizedParticipantList

最后更新 查看 MarkdownAgent 设置

属性

属性 类型 必填 默认值 描述
bufferedItemsCount number - 在可见区域前后渲染的缓冲区项目数量
emptyListElement HTMLElement - 列表为空时渲染的元素
itemHeight number - 每个项目的高度(以像素为单位,假设为固定高度)
items Peer1[] - 待虚拟化的项目
renderItem (item: Peer1, index: number) - 渲染每个项目的函数

使用示例

基本用法

import { RtkVirtualizedParticipantList } from '@cloudflare/realtimekit-react-ui';

function MyComponent() {
  return <RtkVirtualizedParticipantList />;
}

带属性的用法

import { RtkVirtualizedParticipantList } from '@cloudflare/realtimekit-react-ui';

function MyComponent() {
  return (
    <RtkVirtualizedParticipantList
      bufferedItemsCount={42}
      emptyListElement={htmlelement}
      itemHeight={42}
    />
  );
}

这篇文档对您有帮助吗?