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

fix(useVirtualList): 修复当itemHeight为number时,list变化滚动条位置 #2015

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dan1ao
Copy link

@dan1ao dan1ao commented Dec 21, 2022

修复当itemHeight为number时,list变化后offset计算错误。

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix the offset calculation error after the list changes when itemHeight is number
🇨🇳 Chinese 修复当itemHeight为number时,list变化后offset计算错误

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

修复当itemHeight为number时,滚动到较底部时,list数据变化,滚动条停留在原处,页面显示空白。
@CLAassistant
Copy link

CLAassistant commented Dec 21, 2022

CLA assistant check
All committers have signed the CLA.

@dan1ao
Copy link
Author

dan1ao commented Dec 21, 2022

复现步骤:初始list.length为100,容器内可以显示10个,滚动到第N「N>10」个,list.length变化为<N,targetList为[],实际显示空白,wrapperTarget内为空。

@crazylxr crazylxr added this to To do in ahooks tasks Mar 9, 2023
@liuyib liuyib changed the title fix: 修复当itemHeight为number时,list变化滚动条位置 fix(useVirtualList): 修复当itemHeight为number时,list变化滚动条位置 Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants