react-stepzilla
react-stepzilla copied to clipboard
ncaught TypeError: Cannot read property 'isValidated' of undefined
Uncaught TypeError: Cannot read property 'isValidated' of undefined at main.js:71 at Array.map (<anonymous>) at StepZilla.applyValidationFlagsToSteps (main.js:65) at new StepZilla (main.js:53) at ReactCompositeComponent.js:294 at measureLifeCyclePerf (ReactCompositeComponent.js:75)
I have this error.
Are you using a wrapper like Redux? Discussed in #29 and #55
I, too, am having this issue. Not using Redux or any sort of wrapper. I would really like to use this Component, though! It looks really great!
+1
@Kliton @nabrowning @aliogaili can anyone of you share how you have used this component to debug?
It would be great if you can share code snippet also.
Hello sorry I missed this, if you just follow the example and try to create a dummy steps as such:
const steps = [
{
name: 'Step 1',
component: <div/> />
},
{ name: 'Step 2', component: <div /> },
{ name: 'Step 3', component: <div /> },
{ name: 'Step 4', component: <div /> },
{ name: 'Step 5', component: <div /> }
];
and then you render it:
<div className="step-progress">
<StepZilla
steps={steps}
stepsNavigation={false}
prevBtnOnLastStep={false}
/>
</div>
You'll get the undefined error mentioned above.
Increase the number of steps here as well,
> hocValidationAppliedTo={[4]}
Has anyone found why we are getting that error?
Uncaught TypeError: Cannot read property 'isValidated' of undefined at StepZilla.stepMoveAllowed (main.js:318) at StepZilla.abstractStepMoveAllowedToPromise (main.js:341) at main.js:197 ...
I have followed precisely the example and in particular Step 3 of the example to have two input fields validated but I am getting the above error.
this worked out for me
import validation from 'react-validation-mixin';
import strategy from 'joi-validation-strategy';
//your step component goes here
export default validation(strategy)(your-step-name)
you need to install react-validation-mixin and joi-validation-strategy first