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

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

Open
xmsz-stu opened this issue Dec 6, 2023 · 2 comments
Open

Comments

@xmsz-stu
Copy link

xmsz-stu commented Dec 6, 2023

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毫秒以上。而且界面会弹一下
  • 我这个组件是在弹窗里的
@xmsz-stu
Copy link
Author

调试一下是ResizeObserver获取的高度不正确,但是不知道为什么

@xmsz-stu
Copy link
Author

好像是因为有动画效果 导致Component的高度不停的变化,但是ResizeObserver监听不到,只获取到了动画开始的值就没更新了

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

1 participant