react-spreadsheet-import
react-spreadsheet-import copied to clipboard
onSubmit closes modal
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!
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.
Released in 4.6.0!