Closed gitdallas closed 2 months ago
Another workaround would be to pass a "key" to the Wizard to force a re-render on state change;
e.g. <Wizard key={steps.length}>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Cost Management encountered the same issue trying to upgrade the wizard to v5. We start out with a single step, the user makes a selection, then we create a new set of steps.
Ideally, we want to upgrade all PF components prior to v6. This is our last deprecation to remove.
Describe the problem If you have a wizard load with no steps and then the steps get populated, the wizard will not show them. If you have the wizard loaded with steps and then the steps change, there is some other odd behavior (steps getting truncated or left behind).
New Wizard with ability to change steps: https://codesandbox.io/s/competent-fire-dd3vgr?file=/index.tsx
Old Wizard works fine with similar code: https://codesandbox.io/s/trusting-tess-9hxrt8?file=/index.tsx
workaround can be something that prevents it from rendering until after the data is updated, simulated here by "empty" in between step changes, https://codesandbox.io/s/charming-feather-7zyvxm?file=/index.tsx