Is there a function that gets called when the user hits cancel?
Closed this issue · 5 comments
wordyallen commented
I need to change state if the user hits cancel on the file dialog.
zackify commented
So there isn't a way you really know. If onFiles is still empty, nothing is
there. I do see how it could be useful if a user clicks the area, and hits
cancel on the dialog.
How about I add onCancel to the UploadField component for you? It will be
called if you click the dialog, and then cancel out of it.
…On Sat, Apr 22, 2017 at 21:26 Joe Narvaez ***@***.***> wrote:
I need to change state if the user hits cancel on the file dialog.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbacLy4yLWiFm4EUTEfTYU7ZcMwuZ2Sks5ryqipgaJpZM4NFRRs>
.
wordyallen commented
that would be great!
zackify commented
I'll work on this tomorrow. Not 100% sure how to grab a cancel event from
that dialog but I'm sure there's a way.
…On Sat, Apr 22, 2017 at 21:35 Joe Narvaez ***@***.***> wrote:
that would be great!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAbacFoy5inr83DPrKQUdEzpBRt3Uj-3ks5ryqrRgaJpZM4NFRRs>
.
zackify commented
http://stackoverflow.com/questions/11014384/cancel-file-upload-listener Looks like it's not really possible. onFiles would not be triggered until there are some files there. I don't get what your UI would need to do differently. Essentially it can just act as if the upload button was never clicked?
zackify commented
Going to close this for now, let me know if you need any help