Skip to content

disableNavigationBar doesn't disable navigation #360

Description

@carloblasi

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions