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

onSubmit closes modal #138

Closed
lucifer-crybaby opened this issue Sep 26, 2022 · 3 comments
Closed

onSubmit closes modal #138

lucifer-crybaby opened this issue Sep 26, 2022 · 3 comments
Labels
feature Improvement

Comments

@lucifer-crybaby
Copy link

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!

@masiulis
Copy link
Contributor

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 masiulis added the feature Improvement label May 25, 2023
@masiulis
Copy link
Contributor

Released in 4.6.0!

@dcrana
Copy link

dcrana commented Nov 26, 2024

Hi @lucifer-crybaby @masiulis i am facing same UX issue

`import { ReactSpreadsheetImport } from "react-spreadsheet-import";

const ImportSheet = ({ open, onClose, onSubmit, fields, options = {} }) => {
return (

);
};

export default ImportSheet;
`

this is my component . could you please help me how you resolved this issue ?

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

No branches or pull requests

3 participants