Skip to content

Commit

Permalink
fix(pf): bug in wizard navbar
Browse files Browse the repository at this point in the history
The wizard navigation should only contain one WizardNav component. Wrapping the WizardNavItems
in two WizardNav components is causing all steps to be treated as substeps and therefore don't
have step numbers. The fix is to remove one of the WizardNav wrappers.
  • Loading branch information
jkozol committed Oct 23, 2023
1 parent baaf600 commit 4ae5383
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import React, { Fragment, useState, useEffect } from 'react';

import { WizardNavItem, WizardNav } from '@patternfly/react-core';
import { WizardNavItem } from '@patternfly/react-core';

import isEqual from 'lodash/isEqual';
import get from 'lodash/get';
Expand All @@ -21,7 +21,7 @@ const memoValues = (initialValue) => {

const WizardNavigationInternal = React.memo(
({ navSchema, activeStepIndex, maxStepIndex, jumpToStep, valid, validating }) => (
<WizardNav>
<Fragment>
{navSchema
.filter((field) => field.primary)
.map((step) => {
Expand Down Expand Up @@ -63,7 +63,7 @@ const WizardNavigationInternal = React.memo(
</WizardNavItem>
);
})}
</WizardNav>
</Fragment>
),
isEqual
);
Expand Down

0 comments on commit 4ae5383

Please sign in to comment.