Created
September 27, 2017 15:15
-
-
Save bitfade/18f16dc056c975f3ede14b8c744b9133 to your computer and use it in GitHub Desktop.
range change
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
componentDidUpdate: function ( prevProps ) { | |
// update value state on preview mode change or value changed (via props) by another component | |
if ((this.props.previewMode && this.props.previewMode !== prevProps.previewMode) || this.props.value !== prevProps.value) { | |
this.setState({ | |
value: this.emptyIfDefault(this.getCurrentInputValue()), | |
}); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment