Open bhritchie opened 4 years ago
I also have this issue w/ the latest 1.4.0
index.js:152 Uncaught TypeError: Cannot read properties of null (reading 'getVisibleRange')
at Calendar.focusToDate
I'm having the same issue, any updates ?
Errors with react list at Calendar mount
I am seeing regular errors like this in production:
null is not an object (evaluating 'this.list.getVisibleRange')
.The error is that
this.list
is null inCalendar.focusToDate
(https://github.com/Adphorus/react-date-range/blob/master/src/components/Calendar/index.js#L83), after being called fromcomponentDidMount
:I note the comment: "prevent react-list's initial render focus problem" - I wonder if the 0ms timeout is not always sufficient? Does this seems like a likely cause, and, if so, can anyone suggest a resolution?
[BUG] Bug Reproduce Steps
I don't know how to reproduce the issue. I suspect it is a sporadic issue related to react-list not being available when
componentDidMount
runs.[BUG] Expected behaviour
No error.
Environment
Package Version: 1.0.3 React version: 16.8.6 Browser: Various
Thanks in advance.