react-component / react-component/virtual-list

[QUESTION]什么情况下滚动到了底部,但是滚动条没有

Open
#245 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
814
Forks
171
Avg merge
1h 3m
Merged PRs (30d)
3

Description

image
 <List
                data={[...new Array(100).fill(undefined).map((item, index) => ({ id: index }))]}
                height={200}
                itemHeight={30}
                itemKey='id'
                
              >
                {(item) => <div>{item.id}</div>}
              </List>
  • 滚动条的位置刚好卡在高度的一半
  • 如果height是动态值,我只要延迟设置height就正常,但这个时机不一定,可能是100毫秒,也可能是200毫秒以上。而且界面会弹一下
  • 我这个组件是在弹窗里的

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported List example with height 200 and itemHeight 30 inside a modal, then compare fixed and delayed dynamic heights. Start by tracing the virtual-list scroll-height and resize handling; done means the scrollbar reaches the expected position without timing-dependent delays or visible jumping.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.