我的模板中有下面的代码
<kendo-tabstrip #tabstrip (tabSelect)="onTabSelect($event)" [animate]="false">
<kendo-tabstrip-tab [title]="'Custom'">
<ng-template kendoTabContent>
<form [formGroup]="customForm">
<kendo-formfield>
<kendo-formerror *ngIf="customForm.get('customTextbox')?.errors"
>Provide valid cron expression (E.g. * * * * 4 )
</kendo-formerror>
<kendo-textbox formControlName="customTextbox" placeholder="provide date expression"></kendo-textbox>
</kendo-formfield>
</form>
</ng-template>
</kendo-tabstrip-tab>还有另外一个选项卡
然后像这样调用这个方法。0索引是此自定义选项卡的索引。但我只看到选择发生了变化(选项卡图标的样式发生了变化),但它没有显示选项卡的内容。为了查看内容,我必须手动单击它。有人遇到过类似的问题吗?
@ViewChild('tabstrip') public tabstrip: TabStripComponent;
ngAfterViewInit() {
this.tabstrip.selectTab(0)
};发布于 2022-05-17 08:51:29
老实说,我从来没有这样选择过选项卡。
尝试使用selected输入。([selected]="true")。
https://stackoverflow.com/questions/72173296
复制相似问题