Commit a94e21e
committed
fix(pf4): fix bug in wizard navigation toolbar
In Patternfly 4, the WizardNavItem component `step` prop is "the step
passed into the onNavItemClick callback".
http://v4-archive.patternfly.org/v4/components/wizard#wizardnavitem
In Patternfly 5, onNavItemClick no longer exists. Instead, there is an
onClick callback which expects the index of the step to be navigated to.
https://www.patternfly.org/components/wizard/#wizardnavitem
However, filtering the navSchema like so: `.filter((field) =>
field.primary)` results in substeps with field.primary===false being
dropped. Practically, this means the 2nd substep and those following it.
Therefore, the index provided by `.map((step, ind) => ...` is incorrect.
The correct index can still be found from `step.index`.1 parent 3b7ffcb commit a94e21e
File tree
1 file changed
+2
-2
lines changed- packages/pf4-component-mapper/src/wizard/wizard-components
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments