Skip to content

[BUG] stepsNavigation allows you jump past steps that need validation #153

Open
@newbreedofgeek

Description

@newbreedofgeek

Describe the bug
There has been some regression after last few PRs, you can now directly jump past steps that need validation (when you use the top navigation links via stepsNavigation)

To Reproduce
Steps to reproduce the behavior:

  1. Run the Dev server or go to live demo https://newbreedofgeek.github.io/react-stepzilla/
  2. Click on 'step 6'
  3. It goes directly to Step 6, even though Step 3 had a validation condition

Expected behavior
When we clicked on 'step 6' it should do nothing as it detects a middle step needs validation. The behaviour should be the same as follows.

  1. Run the Dev server or go to live demo https://newbreedofgeek.github.io/react-stepzilla/
  2. Click on 'step 6'
  3. It goes directly to Step 6, even though Step 3 had a validation condition
  4. now click on 'step 3'
  5. now click on 'step 4' - notice the validation is shows
  6. now click on 'step 1', now try to jump to 'step 6' again. Notice that it now prevents you and does nothing. Seems this direct jump logic is trigger only after we did 5. above

Screenshots
none

Desktop (please complete the following information if applicable):
all

Smartphone (please complete the following information if applicable):
n/a

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions