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

Give access to pristine prop inside Redux state. #3864

Closed
LAITONEN opened this issue Feb 24, 2018 · 4 comments
Closed

Give access to pristine prop inside Redux state. #3864

LAITONEN opened this issue Feb 24, 2018 · 4 comments
Labels
enhancement improvements in current API help wanted

Comments

@LAITONEN
Copy link

Are you submitting a bug report or a feature request?

feature request

What is the current behavior?

If I make changes to my form, pristine and dirty props of the component wrapped with reduxForm change, but I can't access them inside Redux store in order to render other components dynamically.

The action creator, which determines whether a component should be rendered is not being fired from the same component, that is wrapped with reduxForm, so I can't pass pristine prop to Redux manually.

What is the expected behavior?

To have access to pristine prop of reduxForm inside Redux's state.form

Sandbox Link

It's pretty complicated to replicate the behavior of the app and it seems to me that the feature request is quiet explicit by itself.

What's your environment?

"redux-form": "^7.1.2"

Other information

https://stackoverflow.com/questions/48931861/how-to-access-pristine-prop-of-reduxform-from-inside-the-redux-state

@gustavohenke gustavohenke added enhancement improvements in current API help wanted labels Feb 24, 2018
@gustavohenke
Copy link
Collaborator

gustavohenke commented Feb 24, 2018

Extending isPristine and isDirty selectors to accept an optional field name is probably enough.
PRs welcome.

@LAITONEN
Copy link
Author

@gustavohenke using isPristine or isDirty selectors works. However, now I have another issue.

@erikras
Copy link
Member

erikras commented Jun 12, 2018

Fix released in v7.4.0.

@erikras erikras closed this as completed Jun 12, 2018
@lock
Copy link

lock bot commented Jun 12, 2019

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 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement improvements in current API help wanted
Projects
None yet
Development

No branches or pull requests

3 participants