You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the WindowScroller HOC, if you pass the scrollElement property, WindowScroller will get the wrong initial state (width and height), and the child component (like Collection) will receive the undefined props:
<WindowScrollerscrollElement={scrollElement}>{({ width, height })=>console.log(width,height)} // you will get two undefined at first render
</WindowScroller>
The problem seems to be caused by the spread syntax, it can not copy the DOMRect type data:
Bug Report
When I use the WindowScroller HOC, if you pass the
scrollElement
property,WindowScroller
will get the wrong initial state (width
andheight
), and the child component (likeCollection
) will receive theundefined
props:The problem seems to be caused by the spread syntax, it can not copy the
DOMRect
type data:react-virtualized/source/WindowScroller/WindowScroller.js
Line 96 in 2f6ff33
The spread syntax will be transformed to this:
This is the implementation of
_objectSpread
on my development environment, it only assigns the own property of parameters:The text was updated successfully, but these errors were encountered: