Cannot read property 'scrollTop' of undefined
See original GitHub issueOftentimes, parentRef will have value undefined at first render. This breaks with TypeError: Cannot read property 'scrollTop' of undefined in react-virtual 2.2.4 and above. It works fine in 2.2.3.
See for example: https://codesandbox.io/s/trusting-shamir-05gpx Changing to react-virtual 2.2.3 fixes it.
Issue Analytics
- State:
 - Created 3 years ago
 - Reactions:1
 - Comments:5 (3 by maintainers)
 
Top Results From Across the Web
Cannot read property 'scrollTop' of null` in a custom hook... ...
I made a hook to get the scroll position of a component, like so: function useScrollPosition() { function getScroll() { return { x:...
Read more >react Cannot set property 'scrollTop' of undefined
I'm receiving the following error. How can I solve this issue. TypeError: Cannot set property 'scrollTop' of undefined ...
Read more >Troubleshooting - Material UI
Cannot read property scrollTop of null. This error comes from Fade , Grow , Slide , Zoom components due to a missing DOM...
Read more >When editing a user picker custom field, a 'Cannot read ...
Exception: Uncaught TypeError : Cannot read property 'scrollTop' of undefined. Steps to reproduce. Create a customfield with User Picker (multiple users) ...
Read more >js-error "Cannot read property 'scrollTop' of null" for gantt ...
js-error "Cannot read property 'scrollTop' of null" for gantt chart report.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

🎉 This issue has been resolved in version 2.2.6 🎉
The release is available on:
Your semantic-release bot 📦🚀
We should probably add a test for this use case 😅