Skip to content
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

CSVReader onRemoveFile #144

Open
mperone opened this issue Aug 27, 2022 · 2 comments
Open

CSVReader onRemoveFile #144

mperone opened this issue Aug 27, 2022 · 2 comments

Comments

@mperone
Copy link

mperone commented Aug 27, 2022

I can't seem to figure out from the docs and source code how to handle the old onRemoveFile behavior for CSVReader. I only see onUploadAccepted (can use to replace my old code for onDrop) and onUploadRejected (can use to replace my old code for onError). How can I run my own logic when the file is removed?

@JamesIV4
Copy link

In case you didn't find this solution, here's something that works

{...getRemoveFileProps()}
onClick={(event: Event) => {
    getRemoveFileProps().onClick(event);
    // Your code here
}

@mperone
Copy link
Author

mperone commented Oct 31, 2023

Thanks, will check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants