角材步进器:禁用标题导航 [英] angular material stepper: disable header navigation
本文介绍了角材步进器:禁用标题导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只想通过下一步"和后退"按钮浏览步进器.
I want to navigate the stepper only through the next and back buttons.
我无法执行此操作,因为用户还可以单击每个步骤标签以导航到任何步骤.我不能使用线性,因为它要求每个步骤都具有formArray
或FormGroup
.
I can't get this to work since users can also click each step label to navigate to any step. I can't use linear, since it requires each step to have a formArray
or FormGroup
.
我尝试过<mat-step (click)="$event.stopPropagation()">
.
推荐答案
将其添加到样式表中.我试图禁用标题导航.尝试了很多事情,但是这个hack起作用了.您可以尝试一下,直到Angular Material Team支持此功能为止.
Add this to your style sheet. I was trying to disable the header navigation. Tried many things but this hack worked. You can try this till Angular Material Team support this feature.
::ng-deep .mat-horizontal-stepper-header{
pointer-events: none !important;
}
这篇关于角材步进器:禁用标题导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文