react-native-progress-steps
react-native-progress-steps copied to clipboard
Dynamically create Progress Steps on the fly
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 <StepIcon> 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)
Hi @fengshuifever Any solutions for this ?
@fengshuifever @RashVenkat6795 i had same issue couple of days ago. i think i have figured out solution, waiting for PR to get merged. #91