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

Bug - Wizard - Odd behavior when updating steps #9752

Closed
gitdallas opened this issue Oct 16, 2023 · 3 comments · Fixed by #10748
Closed

Bug - Wizard - Odd behavior when updating steps #9752

gitdallas opened this issue Oct 16, 2023 · 3 comments · Fixed by #10748
Assignees
Labels
Milestone

Comments

@gitdallas
Copy link
Contributor

gitdallas commented Oct 16, 2023

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

@jpuzz0
Copy link
Contributor

jpuzz0 commented Oct 19, 2023

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}>

Copy link

stale bot commented Jan 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jan 9, 2024
@stale stale bot closed this as completed Jan 26, 2024
@tlabaj tlabaj reopened this Jun 13, 2024
@dlabrecq
Copy link
Member

dlabrecq commented Jun 20, 2024

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.

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

Successfully merging a pull request may close this issue.

6 participants