Skip to content

Stepper: How to disable navigation via click on steps #12915

Answered by ddaribo
ntziolis asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ntziolis,

As a custom scenario the best approach to handle this would be implementing a workaround solution on application level. The Stepper API offers useful methods and properties that could be leveraged in this case.
Here is a StackBlitz sample based on one of the Stepper topic demos demonstrating a possible approach.

The solution involves adding a Boolean flag indicating if a step was clicked to the component class:
private stepWasClicked = false;

The flag can be set on the pointerdown event of each step header element. The latter could be retrieved by getting all elements with the dedicated class from the stepper component’s element in the afterViewInit hook:

@ViewChild(IgxStepp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zdrawku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #12914 on April 24, 2023 07:45.