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

Warning that step.id is null when the Wizard is first time rendering. #29

Open
wzard opened this issue Sep 13, 2018 · 9 comments
Open
Milestone

Comments

@wzard
Copy link

wzard commented Sep 13, 2018

Hi,

First of all great library. Does what it says and does it best.
I was trying it out and was getting warning.
Warning: Failed prop type: The prop step.idis marked as required inSteps, but its value is null. in Steps (created by Wizard) in Wizard (created by Onboarding)

Turns out the same warning was replicated in the console.log of the official examples from add animation onwards.

Problem:
Basically whenever I try to render Step, using Wizard's render api, this warning shows up.
The default props of Steps.id = null. When the object is rendering it throws an error.

Can you please check?

@jackjocross
Copy link
Contributor

Thanks!

I think we probably shouldn't mark step.id as required in <Steps> since it is purposely null for the first render.

This shouldn't cause any issues with functionality but I'll try to open a PR soon to get rid of the warning.

@wzard
Copy link
Author

wzard commented Sep 21, 2018

Great. Thanks !

@AntonKL
Copy link

AntonKL commented Feb 13, 2019

Any update on this one @crosscompile ?

@dugasmark
Copy link

@AntonKL To prevent the warning to pop I contionnaly set the "step" prop like this:

<Steps key={step.id} step={step.id ? step : undefined}>

This way while the step id is null the "step" props is not pass

@romarioraffington
Copy link

Seems like a simple fix. @crosscompile why not accept a PR to fix the issue?

@asutedja asutedja added this to the v3 milestone Dec 11, 2019
@github-actions
Copy link

github-actions bot commented Apr 8, 2020

This issue is stale because it has been open 30 days with no activity. Remove no-issue-activity label or comment or this will be closed in 5 days.

@github-actions
Copy link

github-actions bot commented May 9, 2020

This issue is stale because it has been open 30 days with no activity.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity.

@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue is stale because it has been open 30 days with no activity.

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

No branches or pull requests

8 participants