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
I am using react-virtualized in React 18 with typescript. RegisterChild in windowScroller gives a typeError when used as a ref.
What is the current behavior?
When I use
I get an an error as :
Type '(element?: ReactNode) => void' is not assignable to type 'LegacyRef<HTMLDivElement> | undefined'.
Type '(element?: ReactNode) => void' is not assignable to type '(instance: HTMLDivElement | null) => void'.
Types of parameters 'element' and 'instance' are incompatible.
Type 'HTMLDivElement | null' is not assignable to type 'ReactNode'.
Type 'HTMLDivElement' is not assignable to type 'ReactNode'.
Type 'HTMLDivElement' is missing the following properties from type 'ReactPortal': type, props, key
How can I solve this error?
If I use onChildScroll, I get a warning in console for ReactDomNode
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of WindowScroller which is inside StrictMode. Instead, add a ref directly to the element you want to reference
What is the expected behavior?
registerChild should work as ref correctly.
Which versions of React and react-virtualized, and which browser / OS are affected by this issue? Did this work in previous versions of react-virtualized?
I am trying to update to react 18 from react 17 and encountered this issue
Browser
Chrome
OS
Mac
React
18.0.2
React DOM
18.0.2
react-virtualized
9.22.5
The text was updated successfully, but these errors were encountered:
Bug Report
I am using react-virtualized in React 18 with typescript. RegisterChild in windowScroller gives a typeError when used as a ref.
What is the current behavior?
When I use
How can I solve this error?
If I use onChildScroll, I get a warning in console for ReactDomNode
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of WindowScroller which is inside StrictMode. Instead, add a ref directly to the element you want to reference
What is the expected behavior?
registerChild should work as ref correctly.
Which versions of React and react-virtualized, and which browser / OS are affected by this issue? Did this work in previous versions of react-virtualized?
I am trying to update to react 18 from react 17 and encountered this issue
The text was updated successfully, but these errors were encountered: