簡體   English   中英

kendo tabstrip 方法 selectTab 不能按預期工作

[英]kendo tabstrip method selectTab does not work as expected

我的模板中有以下代碼

  <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 索引是此自定義選項卡的完全索引。 但我只看到選擇已更改(選項卡圖標的樣式已更改)但它不顯示選項卡的內容。 我必須手動單擊它才能查看內容。 有沒有人在 angular 中遇到過與 keno-tabstrip 類似的問題?

@ViewChild('tabstrip') public tabstrip: TabStripComponent;

ngAfterViewInit() {
 this.tabstrip.selectTab(0)
 };
  

老實說,我從來沒有以這種方式選擇標簽。

嘗試使用selected的輸入。 ( [selected]="true" )。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM