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

[Feature Request] Include 'submitting' and 'submitSucceeded' in the selectors #2173

Closed
oyeanuj opened this issue Nov 28, 2016 · 4 comments
Closed

Comments

@oyeanuj
Copy link
Contributor

oyeanuj commented Nov 28, 2016

To implement a solution discussed in #2169 (@erikras's 'Many little forms' solution) cleanly, I need to manage logic in the parent container based on whether each of the little forms (auto-saving each field) are submitting or have submitted, etc.

Looking through the documentation in the API, it seems that while one can check for errors or state of a field, there is no selector giving access to see if form is submitting, has submitSucceeded or submitFailed.

In simple cases, one can access the state directly through custom selectors. But for sake of consistency as well as for more complex cases, it might be worthwhile having the following selectors:

  1. isSubmitting: Corresponds to the submitting prop.
  2. hasSubmitSucceeded: Corresponds to the submitSucceeded prop.
  3. hasSubmitFailed: Corresponds to the submitFailed prop.

Not sure if there are more complex reasons for not having those selectors, but I would love to understand more!

@oyeanuj
Copy link
Contributor Author

oyeanuj commented Dec 2, 2016

@erikras Also I see that one can't access field level errors within the form. I'm curious for the reasoning there - does it make too prescriptive that the error has to be accessed/displayed alongside the field?

Alternatively, is that something you could see be one of the selector?

@theKashey
Copy link

Normally - you should have selectors from outside for all props you have inside. But someone forgot to add them.

@erikras
Copy link
Member

erikras commented Dec 23, 2016

Fix published in v6.4.0.

@lock
Copy link

lock bot commented Jun 2, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants