question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'scrollTop' of undefined

See original GitHub issue

Oftentimes, 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
tannerlinsleycommented, Sep 14, 2020

🎉 This issue has been resolved in version 2.2.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

0reactions
kentcdoddscommented, Sep 15, 2020

We should probably add a test for this use case 😅

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found