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] Wrong class applied to progtrckr li #166

Open
Naghal opened this issue Feb 22, 2021 · 2 comments
Open

[BUG] Wrong class applied to progtrckr li #166

Naghal opened this issue Feb 22, 2021 · 2 comments

Comments

@Naghal
Copy link

Naghal commented Feb 22, 2021

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 />);
@Naghal Naghal added the Bug label Feb 22, 2021
@Naghal
Copy link
Author

Naghal commented Feb 22, 2021

Meanwhile, as a workaround, I am adding the .progtrckr-undefined class in my css as the same as prgtrckr-todo.

.progtrckr-undefined {
  color: silver;
  border-bottom: 4px solid silver;
}

@newbreedofgeek
Copy link
Owner

@Naghal sorry for the delay.

Glad you found a CSS fix - but we will fix this in code soon. I'll keep the ticket open

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

No branches or pull requests

2 participants