imagekit-developer/imagekit-react

onSuccess is not firing if i put onChange in props for IKUpload

Closed this issue · 4 comments

Im trying to pass onChange event as props to the IKUpload component, but after this, onSuccess doesn't really do anything.
onError also doesn't do anything.
Could someone help identify my mistake?

<IKUpload folder={"/avatars"} tags={"avatar,sometag"} fileName={"av"} useUniqueFileName={true} onChange={() => console.log('changing')} onSuccess={(res) => {console.log('success'); setAvatarUrl(res.url)}} />

assign me in, please 😄

Hey @FladioArmandika ,

There is already a PR but that needs changes - #14

You can submit a fresh PR with the right changes.

@FladioArmandika do you want to work on this?

Released in Version 1.0.7