-
Notifications
You must be signed in to change notification settings - Fork 128
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
Render from loop #32
Comments
Hi @kchupakhin Did you get a solution to this problem? |
Hi @rashisinha, I took code and modified it, also I removed some extra code for me (I needed less functionality) |
Ok thanks @kchupakhin , I am trying to create a wrapper on top of this library so that I can use this wizard in multiple components. But I am not able to figure out how to dynamically send steps components for each parent component. |
@rashisinha, problem in my case was that I had to pass stepsList which depends on some select component before. And inside, wizard thought that it has only two children, that why I added inside .flat method when I get children from props. I'm not sure, that we have the same problem. Maybe I didn’t quite understand the explanation of your problem. |
@kchupakhin In my case also, the stepList is dynamic and keeps changing depending on user selection. How did you import the components present in stepList in your component as the stepList is dynamic and this list keeps changing. |
Hi there! In my case, I solved this issue mapping a list of steps into an array than rendering this list inside the // Example component
...
const dynamicSteps = dynamicStepsList.map((stepy) => (
<CustomStep
key={stepy.id}
data={stepy}
/>
));
const renderSteps = () => {
return [
<SomeIntroductionSteps key={`intro-${steps.title}`} />,
...dynamicSteps,
];
}
return (
<StepWizard>
{renderSteps()}
</StepWizard>
); |
This workaround should no longer be needed if #76 works out |
Hello. I faced with some problem. My first step is Select and for each selection value I have config file with steps, because I need to change set of steps when I change select value. So, my render looks like
The problem is that StepWizard think that there are only two steps (Select and second), although config file (steps) contains list of steps. How I can solve it?
The text was updated successfully, but these errors were encountered: