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

使用 extraRender 渲染额外的元素,但是虚拟列表中不展示 #290

Open
LuckyFBB opened this issue Nov 1, 2024 · 1 comment

Comments

@LuckyFBB
Copy link

LuckyFBB commented Nov 1, 2024

<List
  data={data}
  height={500}
  itemHeight={1}
  itemKey="id"
  style={{
    border: '1px solid red',
    boxSizing: 'border-box',
  }}
  extraRender={() => <div>11111</div>}
>
  {(item) => <ForwardMyItem {...item} />}
</List>

使用官方的 example,添加 extraRender={() => <div>11111</div>}

chatgpt

@Guan-Erjia
Copy link

传入的 itemHeight 大于添加的 extraRender 的实际高度就会这样,改小一点试试呢

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

2 participants