-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix: changed import style to fix missing api table #296
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -163,6 +162,7 @@ export const InputText = React.forwardRef<HTMLInputElement, InputTextProps>( | |||
}, [ref, internalRef]); | |||
|
|||
useEffect(() => { | |||
globalInputAutoFillTriggerAnimations(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the API table, but this code was being called every render. Just once in the use effect is all that's strictly necessary.
@@ -179,7 +179,7 @@ export const InputText = React.forwardRef<HTMLInputElement, InputTextProps>( | |||
return () => { | |||
element?.removeEventListener("animationstart", onAnimationStart, false); | |||
}; | |||
}); | |||
}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the empty array ensures that this only gets called once on the initial render.
What I did
This PR changes the import of React to make API tables work. This is a known issue in
react-typescript-docgen
styleguidist/react-docgen-typescript#323WPDS-1293