-
When using the stepper we would like to fully control the navigation between steps. For this we:
Note:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. The solution involves adding a Boolean flag indicating if a step was clicked to the component class: The flag can be set on the
Finally, the
This leaves the "Previous/Next" buttons responsible for navigating and being unable to navigate through clicking the steps. The solution works for both the horizontal and vertical modes. I hope it helps implementing your requirement. |
Beta Was this translation helpful? Give feedback.
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 theafterViewInit
hook:@ViewChild(IgxStepp…