-
-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Labels
Description
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:
- Have a conditonnal step defined initially
- Make it a valid condition so it is now visible
- 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
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 />);
