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(useSize): the return value is always undefined #2071

Merged
merged 3 commits into from
Feb 22, 2023

Conversation

liuyib
Copy link
Collaborator

@liuyib liuyib commented Feb 20, 2023

[中文版模板 / 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

none

💡 Background and solution

When pass a ref to useSize, the return value is undefined all the time.

2023-02-20.23.10.45.mov

This was introduced by #2057.

Maybe a test case for ref is missing , so I've added one by the way.

📝 Changelog

Language Changelog
🇺🇸 English There is no way to listen for element changes to get the DOM size in real time
🇨🇳 Chinese 无法监听元素的改变而实时获取 DOM 尺寸

☑️ 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

@liuyib
Copy link
Collaborator Author

liuyib commented Feb 20, 2023

@li-jia-nan @crazylxr review please

@crazylxr crazylxr merged commit 73ac860 into alibaba:master Feb 22, 2023
@liuyib liuyib deleted the fix_useSize branch February 22, 2023 01:58
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

Successfully merging this pull request may close these issues.

3 participants