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

disableNavigationBar doesn't disable navigation #360

Open
carloblasi opened this issue Oct 5, 2021 · 0 comments
Open

disableNavigationBar doesn't disable navigation #360

carloblasi opened this issue Oct 5, 2021 · 0 comments

Comments

@carloblasi
Copy link

carloblasi commented Oct 5, 2021

The comment above the method canGoToStep of BaseNavigationMode says:
image

But really the wizard navigation bar component uses the awGoToStep directive inside for every step.
I tried disabling the navigationBar by subclassing ConfigurableNavigationMode, this is my custom class:

export class CustomNavigationMode extends ConfigurableNavigationMode {
  constructor() {
    super('allow', 'allow');
  }

  protected canTransitionToStep(wizard: WizardComponent, destinationIndex: number): boolean {
    return true;
  }
  
  public isNavigable(wizard: WizardComponent, destinationIndex: number): boolean {
    return !wizard.disableNavigationBar;
  }
}

I set disableNavigationBar to true in my template and canExit is set to true for every step. I expected the wizard to allow me to use goToPreviousStep and goToNextStep programmatically but at the same time prevent navigation by clicking the navigation bar. Instead the wizard still allows me to navigate by clicking the navigation bar, only the cursor has changed from 'pointer' to 'default'.

Is this behavior intended? I'm using version 6.1.0 of the library.

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

No branches or pull requests

1 participant