react-stepzilla icon indicating copy to clipboard operation
react-stepzilla copied to clipboard

ncaught TypeError: Cannot read property 'isValidated' of undefined

Open Kliton opened this issue 8 years ago • 8 comments

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.

Kliton avatar Sep 14 '17 15:09 Kliton

Are you using a wrapper like Redux? Discussed in #29 and #55

awhyz avatar Sep 14 '17 17:09 awhyz

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!

nabrowning avatar Nov 10 '17 20:11 nabrowning

+1

aogaili avatar Nov 12 '17 14:11 aogaili

@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.

zeel avatar Nov 14 '17 09:11 zeel

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.

aogaili avatar Mar 28 '18 11:03 aogaili

Increase the number of steps here as well,

> hocValidationAppliedTo={[4]}

MuhammadHasham23 avatar May 15 '18 20:05 MuhammadHasham23

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.

Sotrek avatar Oct 01 '18 13:10 Sotrek

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

Mina161 avatar Aug 01 '19 12:08 Mina161