Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'hashKey' of undefined #42

Open
LukasDeco opened this issue Aug 28, 2019 · 2 comments
Open

Cannot read property 'hashKey' of undefined #42

LukasDeco opened this issue Aug 28, 2019 · 2 comments

Comments

@LukasDeco
Copy link

I am trying to render steps form a loop. Here is my code:

<StepWizard isLazyMount={true} nav={<WizardDots />}>
          <Introduction />
          <CreateProfileInstructions giftTypes={state.giftTypes} onConfirmation={this.setGiftSelectionMode}/>
            {state.pages.map((type) => (
              <ProfileSelection key={type} hashKey={type} giftType={type} />
            ))}
        </StepWizard>

I am getting this error about cannot read property hashkey of undefined. I have tried initializing state.pages as both an empty array and an array with a single string element. How can I render steps based on an array in state?

Thanks!

@janakact
Copy link

janakact commented Sep 3, 2019

I get the same error

@dbmanny18
Copy link

I'm not sure what you're doing in ProfileSelection...but it seems as though in any child component of step wizard, any prop you pass in will be overridden by the parent props which are the props of StepWizard (nextStep, currentStep, etc..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants