Replies: 2 comments 1 reply
-
Hey @AJLemos |
Beta Was this translation helpful? Give feedback.
1 reply
-
@AJLemos version 0.18.3 released and available now with the updated definitions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are currently using the
asUploadButton()
HOC for a custom upload button.The docs for this HOC state:
However,
asUploadButton
returnsUploadButtonProps
, which does not include anonClick
prop (seen here). The docs indicate the props should match the<UploadButton>
component, which does include this prop (seen here).This creates a type checking error when using these props (seen below).
Is the omission of the
onClick
prop intentional? Should the docs indicate this? Or shouldonClick
be included in theButtonProps
interface?We need to call a side-effect on this click to track the event in our analytics. Here is simplified example of our custom button:
I also verified that the same type error occurs when adding an
onClick
prop to the<UploadButton>
component.I see in this discussion that using
showFileUpload()
might actually simplify our use case. But I was curious if the docs or the interface need to be updated.Beta Was this translation helpful? Give feedback.
All reactions