-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref
Type incorrect
#110
Comments
pr is welcome! |
although im not sure why nobody has hit this issue before |
Thanks, I'll get to that over the next couple of days.
My guess is that you've covered the 80% use case by accepting various props, and I'm operating in the 20% use case because I need control over the Lottie instance. Multiply that with typescript usage and it's likely a pretty small number of people who have hit this. |
Currently the type of the
ref
prop on thePlayer
component is inherited from theHTMLDivElement
, but in the source the Lottie instance is passed to the forwarded ref.Type inheriting here:
react-lottie-player/src/index.d.ts
Lines 10 to 26 in 66e98a1
Lottie ref assigned here:
react-lottie-player/src/makeLottiePlayer.js
Lines 66 to 70 in 66e98a1
I am happy to assist with correcting this by exposing the
animElementRef
prop and correcting the types for both if a PR would be accepted.The text was updated successfully, but these errors were encountered: