Created
April 19, 2017 16:22
-
-
Save pavel-lens/b9f1b2ca412f79bcedd389dc0a1028ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleApplyClick() { | |
const { onApplyClick } = this.props | |
const result = onApplyClick() | |
// Don't update state if callback is signaling failing behaviour | |
if (result !== false) { | |
this.setState({ touched: false }) | |
} | |
} | |
handleRevertClick() { | |
const { onRevertClick } = this.props | |
const result = onRevertClick() | |
// Don't update state if callback is signaling failing behaviour | |
if (result !== false) { | |
this.setState({ touched: false }) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment