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

using requestDataFromUser with source erros does not allow me to input any data #133

Open
leognmotta opened this issue Dec 15, 2021 · 4 comments

Comments

@leognmotta
Copy link

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [x] question about how to use this project

  • Summary

For some reason, I am using requestDataFromUser just like @fuchien is using, when I open the modal with errors array, I can't input any data to fix the errors, just following this code snippet from your docs

const passedInData = {
  source: [
    {
      data: {firstName: "John", email: "[email protected]", userId: 12345},
      errors: [{key: "userId", message: "userId already exists in database", level: "error"}]
    },
    {
      data: {firstName: "", email: "jane@doe", userId: 54321},
      errors: [
        {key: "firstName", message: "Name cannot be blank", level: "error"},
        {key: "email", message: "Email invalid. Please correct email address", level: "error"}
      ]
    }
  ]
}

const launchFlatfile = () => {
  importer.requestDataFromUser(passedInData)
}

and it does not work when the modal opens, it shows the red fields with correct validations, but I can't update any value

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
@leognmotta
Copy link
Author

leognmotta commented Dec 15, 2021

https://www.loom.com/share/5d16ca86f70e4d5fa91882be73ed6d88

as you can see, I can't type anything

@leognmotta
Copy link
Author

it happens right after using importer.close(), and using requestDataFromUser again with source

@maksymblank
Copy link
Contributor

@leognmotta thank you for your report! Would you be able to provide the settings and hooks you're using? Perhaps it'll be easier to create a CodeSandbox with your configs?

@leognmotta
Copy link
Author

Trying, to create a sandbox, but not being able to reproduce

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