Skip to content

[BUG] Wrong class applied to progtrckr li #166

@Naghal

Description

@Naghal

Describe the bug
When you have conditionnal steps and the navigation bar is enabled, when a step goes from hidden to visible, the class progtrckr-undefined is added to the last li element instead of progtrckr-todo.

To Reproduce
Steps to reproduce the behavior:

  1. Have a conditonnal step defined initially
  2. Make it a valid condition so it is now visible
  3. See, the wrong class is applied to the last list item

Expected behavior
The list item should have the proper class or we should have access to a method to refresh the navigation progressbar

Screenshots
image
image

Desktop (please complete the following information if applicable):

  • OS: [e.g. iOS] Ubuntu 21
  • Browser [e.g. chrome, safari] Chrome

Additional context
Package version : ^6.0.2
Code to reproduce:

const getSteps = () => {
    return [
      { name: <><FaList /> {t('prp.agreement_details')}</>, component: <AgreementDetails inputProps={inputProps} file={getFile()} paymentIntervals={paymentIntervals} /> },
      ... inputProps('numberOfPayments').value > 1 ? [{ name: <><FaMoneyBillAlt/> {t('prp.employment_info')}</>, component: <EmploymentInfo inputProps={inputProps} cities={cities} states={states} /> }] : [],
      { name: <><FaSearch /> {t('prp.review')}</>, component: <Review inputProps={inputProps} valid={valid} isSubmitting={isSubmitting} file={getFile()} /> },
    ];
  }

return (<Stepper steps={getSteps()} dontValidate />);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions