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

Tree titleRender virtual list dont render when resizing #25960

Open
1 task done
msotnikov opened this issue Aug 2, 2020 · 3 comments
Open
1 task done

Tree titleRender virtual list dont render when resizing #25960

msotnikov opened this issue Aug 2, 2020 · 3 comments
Labels
🐛 Bug Ant Design Team had proved that this is a bug. Inactive

Comments

@msotnikov
Copy link

msotnikov commented Aug 2, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Click on promary buttons. The items render only when scroll the list

What is expected?

All items should render when resize.

What is actually happening?

Look at screenshot
image

Environment Info
antd 4.5.1
React 16.13.1
System Windows 10
Browser Chrome 84.0.4147.105
@07akioni 07akioni added the 🐛 Bug Ant Design Team had proved that this is a bug. label Aug 2, 2020
@zombieJ
Copy link
Member

zombieJ commented Aug 3, 2020

Seems virtual list not update when height quick switch from 0 to another number.

@zombieJ
Copy link
Member

zombieJ commented Aug 3, 2020

VirtualList update its logic by componentDidUpdate. Which breaks its states when async update on the height prop. It may not easy to fix this or we may need refactor with hook instead:
https://github.com/react-component/virtual-list/blob/7aae9e0273d9d859106cf4fe3ecae8f69c70d9a3/src/List.tsx#L196

@msotnikov
Copy link
Author

VirtualList update its logic by componentDidUpdate. Which breaks its states when async update on the height prop. It may not easy to fix this or we may need refactor with hook instead: https://github.com/react-component/virtual-list/blob/7aae9e0273d9d859106cf4fe3ecae8f69c70d9a3/src/List.tsx#L196

Mentioned component has been refactored for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug. Inactive
Projects
None yet
Development

No branches or pull requests

4 participants