react-spreadsheet-import icon indicating copy to clipboard operation
react-spreadsheet-import copied to clipboard

onSubmit closes modal

Open lucifer-crybaby opened this issue 3 years ago • 1 comments

If onSubmit is fired the modal closes automatically making it bad UX, example is that if user completes the flow frontend makes request to backend and backend checks if data is correct or is there any data that has already in the DB or something like that and if there is backend will send error to frontend and frontend will display that error notifying to user that there is an error and user will fix that data and sends again but modal closing automatically makes user to re upload sheet everytime if there is an error. I'm not an expert on this one but if there was an option to manually close modal after onSubmit that would be great!

lucifer-crybaby avatar Sep 26 '22 03:09 lucifer-crybaby

Hey @lucifer-crybaby, thanks for the report, I agree that onSubmit should be able to accept async function. Feel free if you would like to create a PR.

masiulis avatar Oct 19 '22 12:10 masiulis

Released in 4.6.0!

masiulis avatar Dec 18 '23 11:12 masiulis