react-component / react-component/virtual-list
[QUESTION]什么情况下滚动到了底部,但是滚动条没有
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 814
- Forks
- 171
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 3
Description
<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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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