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

SaveButton renders disabled if Form is pristine. #4773

Merged
merged 7 commits into from
May 26, 2020

Conversation

WiXSL
Copy link
Contributor

@WiXSL WiXSL commented May 6, 2020

Implements #4733

@fzaninotto
Copy link
Member

This is technically a new feature, please PR against next rather than master.

@WiXSL WiXSL changed the base branch from master to next May 7, 2020 12:47
@WiXSL WiXSL force-pushed the submitbutton-disable-if-pristine branch from 13a3fda to 79279bb Compare May 7, 2020 12:55
@kopax
Copy link
Contributor

kopax commented May 9, 2020

Excellent. I wonder how I did miss the <SaveButton />. I would not have added such good test anyway it's a good job. Thank you so much @WiXSL for supporting the feature!

Side question, since pristine and disabled can be found at the same place, why did you decide not to add the submitting to disabled props? This would prevent an user to submit a form multiple time:

disabled={submitting || disabled || pristine}

@WiXSL
Copy link
Contributor Author

WiXSL commented May 9, 2020

@kopax The saving prop is already handling that issue in the SaveButton component.

@fzaninotto fzaninotto merged commit 8b45ec0 into marmelab:next May 26, 2020
@fzaninotto
Copy link
Member

Thanks!

@kopax
Copy link
Contributor

kopax commented Jun 6, 2020

I can't get this to work in newest 3.6.0, see #4733 (comment)

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

Successfully merging this pull request may close these issues.

3 participants