{"id":4841,"date":"2022-08-24T19:07:24","date_gmt":"2022-08-24T13:37:24","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/"},"modified":"2022-08-24T19:07:24","modified_gmt":"2022-08-24T13:37:24","slug":"solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/","title":{"rendered":"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-54397414\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"54397414\" data-parentid=\"54239701\" data-score=\"2\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/codesandbox.io\/s\/6zrw7r66rr\">https:\/\/codesandbox.io\/s\/6zrw7r66rr<\/a><\/p>\n<p>I have forked your codesandbox, and edit 4 files. Pretty sure it satisfies all your requirements stated above<\/p>\n<p>VerticalLinearStepper.js: this is where we store our <code>username, password, disabledNext (radioButton)<\/code> state and <code>handleChange<\/code> method for <code>setState<\/code>. Then, we passed down the state to -&gt; <code>Step1.js<\/code> -&gt; <code>AsyncValidationForm.js<\/code>.<\/p>\n<pre><code>class VerticalLinearStepper extends React.Component {\n  state = {\n    activeStep: 0,\n    \/\/we set our state in this parent\n    disabledNext: true,\n    username: \"\",\n    password: \"\"\n  };\n\n  steps = {\n    \"Select campaign settings\": Step1,\n    \"Create an ad group\": Step2,\n    \"Create an ad\": Step3\n  };\n\n  \/\/setState for disabledNext\n  handleChangeDisabledNext = value =&gt; {\n    this.setState({ disabledNext: value });\n  };\n  \/\/setState for username, password\n  handleChange = (name, value) =&gt; {\n    this.setState({ [name]: value });\n  };\n\n  stepsCount = () =&gt; Object.values(this.steps).length;\n\n  canGoBack = () =&gt; this.state.activeStep &gt; 0;\n  canGoForward = () =&gt; this.state.activeStep &lt; this.stepsCount();\n\n  isFinished = () =&gt; this.state.activeStep === this.stepsCount();\n\n  handleBack = () =&gt; {\n    if (this.canGoBack()) {\n      this.setState(prevState =&gt; ({ activeStep: prevState.activeStep - 1 }));\n    }\n  };\n\n  handleNext = () =&gt; {\n    if (this.canGoForward()) {\n      this.setState(prevState =&gt; ({ activeStep: prevState.activeStep + 1 }));\n    }\n  };\n\n  handleReset = () =&gt; this.setState({ activeStep: 0 });\n\n  render() {\n    const { classes } = this.props;\n    const { activeStep } = this.state;\n\n    return (\n      &lt;div className={classes.root}&gt;\n        &lt;Stepper activeStep={activeStep} orientation=\"vertical\"&gt;\n          {Object.entries(this.steps).map(([label, CustomStep]) =&gt; (\n            &lt;Step key={label}&gt;\n              &lt;StepLabel&gt;{label}&lt;\/StepLabel&gt;\n              &lt;StepContent&gt;\n                &lt;CustomStep\n                  canGoBack={this.canGoBack()}\n                  canGoForward={this.canGoForward()}\n                  onBack={this.handleBack}\n                  onNext={this.handleNext}\n                  classes={classes}\n                  \/\/we pass down the state and its' setState method\n                  handleChangeDisabledNext={this.handleChangeDisabledNext}\n                  disabledNext={this.state.disabledNext}\n                  handleChange={this.handleChange}\n                  username={this.state.username}\n                  password={this.state.password}\n                \/&gt;\n              &lt;\/StepContent&gt;\n            &lt;\/Step&gt;\n          ))}\n        &lt;\/Stepper&gt;\n\n        {this.isFinished() &amp;&amp; (\n          &lt;Paper square elevation={0} className={classes.resetContainer}&gt;\n            &lt;Typography&gt;All steps completed - you&amp;apos;re finished&lt;\/Typography&gt;\n            &lt;Button onClick={this.handleReset} className={classes.button}&gt;\n              Reset\n            &lt;\/Button&gt;\n          &lt;\/Paper&gt;\n        )}\n      &lt;\/div&gt;\n    );\n  }\n}\n<\/code><\/pre>\n<p>In <code>AsyncValidationForm.js<\/code>, we bind <code>onChange<\/code> method to track the value and call the <code>setState<\/code> method and <code>this.props.handleChange<\/code> for <code>setState<\/code> in <code>VerticalLinearStepper.js<\/code><\/p>\n<pre><code>const renderField = ({\n  input,\n  label,\n  type,\n  \/\/checked is for radio, initialValue is for setting the username, password value\n  checked,\n  initialValue,\n  meta: { asyncValidating, touched, error }\n}) =&gt; {\n  return (\n    &lt;div&gt;\n      &lt;label&gt;{label}&lt;\/label&gt;\n      &lt;div className={asyncValidating ? \"async-validating\" : \"\"}&gt;\n        &lt;input\n          {...input}\n          value={initialValue} \/\/add value attr\n          checked={checked} \/\/add checked attr\n          type={type}\n          placeholder={label}\n        \/&gt;\n        {touched &amp;&amp; error &amp;&amp; &lt;span&gt;{error}&lt;\/span&gt;}\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  );\n};\n\nclass AsyncValidationForm extends React.Component {\n  constructor(props) {\n    super(props);\n    console.log(\"AsyncValidationForm ----&gt;\");\n\n    this.state = {\n      \/\/pass down VerticalLinearStepper.js state if any\n      username: this.props.username ? this.props.username : \"\",\n      password: this.props.password ? this.props.password : \"\",\n      \/\/this determines whether any fields is filled or not from VerticalLinearStepper\n      pristine:\n        this.props.username || this.props.password || !this.props.disabledNext\n          ? false\n          : true\n    };\n  }\n\n  passRadioValue = e =&gt; {\n    this.setState({ pristine: false }, () =&gt; {\n      this.props.handleChangeDisabledNext(!e.target.checked);\n    });\n  };\n\n  handleChange = name =&gt; event =&gt; {\n    const value = event.target.value;\n    this.setState(\n      {\n        [name]: value,\n        pristine: false\n      },\n      () =&gt; {\n        this.props.handleChange(name, value); \/\/setState username, password of VerticalLinearStepper.js\n      }\n    );\n  };\n\n  resetForm = () =&gt; {\n    this.props.handleChangeDisabledNext(true); \/\/setState disabledNext of VerticalLinearStepper.js\n    this.setState(\n      {\n        username: \"\",\n        password: \"\",\n        pristine: true\n      },\n      () =&gt; {\n        this.props.handleChange(\"username\", \"\");\n        this.props.handleChange(\"password\", \"\");\n      }\n    );\n\n    this.props.reset();\n  };\n\n  \/\/ this.setState({ disabled: !this.state.disabled });\n\n  render() {\n    const { handleSubmit, pristine, reset, submitting } = this.props;\n\n    return (\n      &lt;form onSubmit={handleSubmit}&gt;\n        &lt;Field\n          name=\"username\"\n          type=\"text\"\n          component={renderField}\n          label=\"Username\"\n          initialValue={this.state.username}\n          onChange={this.handleChange(\"username\")}\n        \/&gt;\n        &lt;Field\n          name=\"password\"\n          type=\"password\"\n          component={renderField}\n          label=\"Password\"\n          initialValue={this.state.password}\n          onChange={this.handleChange(\"password\")}\n        \/&gt;\n\n        &lt;label&gt;\n          &lt;Field\n            name=\"sex\"\n            component={renderField}\n            type=\"radio\"\n            value=\"male\"\n            checked={!this.props.disabledNext}\n            onChange={this.passRadioValue}\n          \/&gt;{\" \"}\n          Male\n        &lt;\/label&gt;\n\n        &lt;div&gt;\n          &lt;button type=\"submit\" disabled={submitting}&gt;\n            Sign Up\n          &lt;\/button&gt;\n          &lt;button\n            type=\"button\"\n            disabled={(pristine || submitting) &amp;&amp; this.state.pristine} \/\/add state.pristine checking\n            onClick={this.resetForm}\n          &gt;\n            Clear Values\n          &lt;\/button&gt;\n        &lt;\/div&gt;\n      &lt;\/form&gt;\n    );\n  }\n}\n<\/code><\/pre>\n<p>Then, in <code>StepTemplate.js<\/code> Add <code>disabledNext, checkDisabledNext<\/code> props. <code>checkDisabledNext<\/code> to determine whether the Next Button will have conditional checking or not. <code>disabledNext<\/code> is the disabled value.<\/p>\n<pre><code>const StepTemplate = ({\n  classes,\n  canGoBack,\n  canGoForward,\n  onBack,\n  onNext,\n  text,\n  children,\n  \/\/we pass down these 2 values\n  disabledNext,\n  checkDisabledNext\n}) =&gt; (\n  &lt;Fragment&gt;\n    &lt;Typography&gt;{text}&lt;\/Typography&gt;\n\n    &lt;div className={classes.actionsContainer}&gt;\n      &lt;div&gt;\n        {children}\n\n        &lt;Button\n          disabled={!canGoBack}\n          onClick={onBack}\n          className={classes.button}\n        &gt;\n          Back\n        &lt;\/Button&gt;\n        &lt;Button\n          variant=\"contained\"\n          color=\"primary\"\n          onClick={onNext}\n          className={classes.button}\n          \/\/determine whether we should check button disabled or not\n          disabled={checkDisabledNext ? disabledNext : false}\n        &gt;\n          {canGoBack ? \"Next\" : \"go to next step\"}\n        &lt;\/Button&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/Fragment&gt;\n);\n<\/code><\/pre>\n<p>This is <code>Step1.js<\/code>, here we just pass props to <code>StepTemplate<\/code> and <code>AsyncValidationForm<\/code>:<\/p>\n<pre><code>const Step = props =&gt; (\n  &lt;StepTemplate\n    text={`\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n    `}\n    \/\/we want to apply checking on Step1.js, so we add checkDisabledNext attribute\n    checkDisabledNext={true}\n    \/\/ disabledNext={this.props.disabledNext} \/\/no need to do this because will be passed with  {...props} below\n    {...props}\n  &gt;\n    &lt;form&gt;\n      form for the first step here\n      &lt;div&gt;test here&lt;\/div&gt;\n      &lt;AsyncValidationForm\n        onSubmit={values =&gt; {\n          console.log(values);\n          alert(\n            `Values: username: ${values.username} password: ${values.password}`\n          );\n        }}\n        \/\/these are the props passed down from VerticalLinearStepper.js\n        handleChangeDisabledNext={props.handleChangeDisabledNext}\n        disabledNext={props.disabledNext}\n        handleChange={props.handleChange}\n        username={props.username}\n        password={props.password}\n      \/&gt;\n    &lt;\/form&gt;\n  &lt;\/StepTemplate&gt;\n);\n<\/code><\/pre>\n<p>Here is the re-render issue fix:<br \/>\n<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/codesandbox.io\/s\/vqvxj7ky4y\">https:\/\/codesandbox.io\/s\/vqvxj7ky4y<\/a><br \/>\nUpdate <code>VerticalLinearStepper.js<\/code>, then we dont need Step1.js file anymore, since we write the content of Step1.js in this file:<\/p>\n<pre><code>import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui\/core\/styles\";\nimport Stepper from \"@material-ui\/core\/Stepper\";\nimport Step from \"@material-ui\/core\/Step\";\nimport StepLabel from \"@material-ui\/core\/StepLabel\";\nimport StepContent from \"@material-ui\/core\/StepContent\";\nimport Button from \"@material-ui\/core\/Button\";\nimport Paper from \"@material-ui\/core\/Paper\";\nimport Typography from \"@material-ui\/core\/Typography\";\n\n\/\/ import Step1 from \".\/steps\/Step1\";\nimport Step2 from \".\/steps\/Step2\";\nimport Step3 from \".\/steps\/Step3\";\n\nimport StepTemplate from \".\/steps\/StepTemplate\";\nimport AsyncValidationForm from \".\/forms\/AsyncValidationForm\";\n\nconst styles = theme =&gt; ({\n  root: {\n    width: \"90%\"\n  },\n  button: {\n    marginTop: theme.spacing.unit,\n    marginRight: theme.spacing.unit\n  },\n  actionsContainer: {\n    marginBottom: theme.spacing.unit * 2\n  },\n  resetContainer: {\n    padding: theme.spacing.unit * 3\n  }\n});\n\nclass VerticalLinearStepper extends React.Component {\n  state = {\n    activeStep: 0,\n    \/\/we set our state in this parent\n    disabledNext: true,\n    username: \"\",\n    password: \"\"\n  };\n\n  steps = {\n    \/\/we pass the content of Step1 here, so we dont have to pass props\n    \"Select campaign settings\": props =&gt; (\n      &lt;StepTemplate\n        text={`\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n\n        For each ad campaign that you create, you can control how much you're\n        willing to spend on clicks and conversions, which networks and\n        geographical locations you want your ads to show on, and more.\n    `}\n        \/\/we want to apply checking on Step1.js, so we add checkDisabledNext attribute\n        checkDisabledNext={true}\n        disabledNext={this.state.disabledNext} \/\/use this class' state\n        {...props}\n      &gt;\n        &lt;form&gt;\n          form for the first step here\n          &lt;div&gt;test here&lt;\/div&gt;\n          &lt;AsyncValidationForm\n            onSubmit={values =&gt; {\n              console.log(values);\n              alert(\n                `Values: username: ${values.username} password: ${\n                  values.password\n                }`\n              );\n            }}\n            \/\/we use this class setstate , no need to pass down props\n            handleChangeDisabledNext={this.handleChangeDisabledNext}\n            disabledNext={this.state.disabledNext}\n            handleChange={this.handleChange}\n            username={this.state.username}\n            password={this.state.password}\n          \/&gt;\n        &lt;\/form&gt;\n      &lt;\/StepTemplate&gt;\n    ),\n    \"Create an ad group\": Step2,\n    \"Create an ad\": Step3\n  };\n\n  \/\/setState for disabledNext\n  handleChangeDisabledNext = value =&gt; {\n    this.setState({ disabledNext: value });\n  };\n  \/\/setState for username, password\n  handleChange = (name, value) =&gt; {\n    this.setState({ [name]: value });\n  };\n\n  stepsCount = () =&gt; Object.values(this.steps).length;\n\n  canGoBack = () =&gt; this.state.activeStep &gt; 0;\n  canGoForward = () =&gt; this.state.activeStep &lt; this.stepsCount();\n\n  isFinished = () =&gt; this.state.activeStep === this.stepsCount();\n\n  handleBack = () =&gt; {\n    if (this.canGoBack()) {\n      this.setState(prevState =&gt; ({ activeStep: prevState.activeStep - 1 }));\n    }\n  };\n\n  handleNext = () =&gt; {\n    if (this.canGoForward()) {\n      this.setState(prevState =&gt; ({ activeStep: prevState.activeStep + 1 }));\n    }\n  };\n\n  handleReset = () =&gt; this.setState({ activeStep: 0 });\n\n  render() {\n    const { classes } = this.props;\n    const { activeStep } = this.state;\n\n    return (\n      &lt;div className={classes.root}&gt;\n        &lt;Stepper activeStep={activeStep} orientation=\"vertical\"&gt;\n          {Object.entries(this.steps).map(([label, CustomStep]) =&gt; (\n            &lt;Step key={label}&gt;\n              &lt;StepLabel&gt;{label}&lt;\/StepLabel&gt;\n              &lt;StepContent&gt;\n                &lt;CustomStep\n                  canGoBack={this.canGoBack()}\n                  canGoForward={this.canGoForward()}\n                  onBack={this.handleBack}\n                  onNext={this.handleNext}\n                  classes={classes}\n                \/&gt;\n              &lt;\/StepContent&gt;\n            &lt;\/Step&gt;\n          ))}\n        &lt;\/Stepper&gt;\n\n        {this.isFinished() &amp;&amp; (\n          &lt;Paper square elevation={0} className={classes.resetContainer}&gt;\n            &lt;Typography&gt;All steps completed - you&amp;apos;re finished&lt;\/Typography&gt;\n            &lt;Button onClick={this.handleReset} className={classes.button}&gt;\n              Reset\n            &lt;\/Button&gt;\n          &lt;\/Paper&gt;\n        )}\n      &lt;\/div&gt;\n    );\n  }\n}\n\nVerticalLinearStepper.propTypes = {\n  classes: PropTypes.object\n};\n\nexport default withStyles(styles)(VerticalLinearStepper);\n<\/code><\/pre>\n<p>Additional reference: <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/itnext.io\/react-component-class-vs-stateless-component-e3797c7d23ab\">React: Class Component vs Functional Component<\/a><\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">3<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved enable the go to next step button, tried setting up state and created new onclick method in the radio button <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] https:\/\/codesandbox.io\/s\/6zrw7r66rr I have forked your codesandbox, and edit 4 files. Pretty sure it satisfies all your requirements stated above VerticalLinearStepper.js: this is where we store our username, password, disabledNext (radioButton) state and handleChange method for setState. Then, we passed down the state to -&gt; Step1.js -&gt; AsyncValidationForm.js. class VerticalLinearStepper extends React.Component { state = &#8230; <a title=\"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\" aria-label=\"More on [Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[346,333,1110,784,1109],"class_list":["post-4841","post","type-post","status-publish","format-standard","hentry","category-solved","tag-html","tag-javascript","tag-material-ui","tag-reactjs","tag-redux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] https:\/\/codesandbox.io\/s\/6zrw7r66rr I have forked your codesandbox, and edit 4 files. Pretty sure it satisfies all your requirements stated above VerticalLinearStepper.js: this is where we store our username, password, disabledNext (radioButton) state and handleChange method for setState. Then, we passed down the state to -&gt; Step1.js -&gt; AsyncValidationForm.js. class VerticalLinearStepper extends React.Component { state = ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-24T13:37:24+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button\",\"datePublished\":\"2022-08-24T13:37:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\"},\"wordCount\":176,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"html\",\"javascript\",\"material-ui\",\"reactjs\",\"redux\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\",\"name\":\"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-08-24T13:37:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button - JassWeb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button - JassWeb","og_description":"[ad_1] https:\/\/codesandbox.io\/s\/6zrw7r66rr I have forked your codesandbox, and edit 4 files. Pretty sure it satisfies all your requirements stated above VerticalLinearStepper.js: this is where we store our username, password, disabledNext (radioButton) state and handleChange method for setState. Then, we passed down the state to -&gt; Step1.js -&gt; AsyncValidationForm.js. class VerticalLinearStepper extends React.Component { state = ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/","og_site_name":"JassWeb","article_published_time":"2022-08-24T13:37:24+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button","datePublished":"2022-08-24T13:37:24+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/"},"wordCount":176,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["html","javascript","material-ui","reactjs","redux"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/","url":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/","name":"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-08-24T13:37:24+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-enable-the-go-to-next-step-button-tried-setting-up-state-and-created-new-onclick-method-in-the-radio-button\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] enable the go to next step button, tried setting up state and created new onclick method in the radio button"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/4841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=4841"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/4841\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=4841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=4841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=4841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}