Created
November 8, 2018 12:14
-
-
Save cbrannen9a/d56c56dfe2f63df7fae6a1053f69b756 to your computer and use it in GitHub Desktop.
Partial Checkout6
This file contains 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
handleValid = () => { | |
const { activeStep, validation } = this.state; | |
if (activeStep === 0 && !validation.hasErrorAddressForm) { | |
return false; | |
} else if (activeStep === 2) { | |
return false; | |
} | |
return true; | |
} | |
//... | |
...// | |
//The Next/Place Order button | |
<Button | |
variant="contained" | |
color="primary" | |
onClick={this.handleNext} | |
className={classes.button} | |
disabled={this.handleValid()} | |
> | |
{activeStep === steps.length - 1 ? 'Place order' : 'Next'} | |
</Button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment