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

Dynamically create Progress Steps on the fly #81

Open
fengshuifever opened this issue Apr 5, 2021 · 2 comments
Open

Dynamically create Progress Steps on the fly #81

fengshuifever opened this issue Apr 5, 2021 · 2 comments

Comments

@fengshuifever
Copy link

Hi there,
I've seen this question asked before in the Issues area but the solutions didn't seem to work for me.
Code:

<ProgressSteps>
...earlier progressstep
{recipe.recipeInstructions.map(function(name, index){
                        return (
                            <ProgressStep>
                                <View>
                                    <Text>Test Method {name}</Text>
                                </View>
                            </ProgressStep>
                        )
                    })}
</ProgressSteps>

What I'm trying to do above is generate a ProgressStep for every recipe instruction that exists in that array. Unfortunately as soon as I try this, an error throws with
undefined is not an object (evaluating '_this.props.children[i].props.label')

This seems to be coming from the ProgressSteps.js file at around line 38 (where the is calling this.getChildProps().

Is there a way or an update coming to the package where we'll be able to dynamically create new ProgressStep components on the fly? I'm not quite sure how to progress with this.
(I've also tried wrapping the ProgressStep tags with a Fragment but to no avail)

@RashVenkat6795
Copy link

Hi @fengshuifever
Any solutions for this ?

@haseeb-numu
Copy link

haseeb-numu commented Jul 9, 2021

@fengshuifever @RashVenkat6795 i had same issue couple of days ago. i think i have figured out solution, waiting for PR to get merged. #91

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