react-scroll
react-scroll copied to clipboard
React-scroll not working with Material UI 5 Tabs - Cannot read property 'addEventListener' of undefined
Hello here is a working example with Material-UI 4
https://codesandbox.io/s/cranky-tess-xd72g
And here the same code with Material-UI 5 - not working
https://codesandbox.io/s/crazy-jasper-5ozl5
Error-Message:
Cannot read property 'addEventListener' of undefined
Thank you.
Ive got the same problem after updating to Mui5.
solution?? :(
Wrap it in forwardRef and use component={SLink}.
const SLink = forwardRef((props, ref) => <Link {...props}/>);
@chrmoritz Thank you, it worked:
https://codesandbox.io/s/nifty-waterfall-en9to
Unfortunately there is now this error message:
Warning: React does not recognize the
innerRefprop on a DOM element.