kendo tabstrip method selectTab does not work as expected

993 views Asked by At

I have following code in my template

  <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>

There are also another tabs

And invoking this method like this. 0 index is excatly index of this Custom Tab. But I only see that selection has changed(styles of the tab icon changed) but it does not display content of the tab. I have to click it manually in order to see content. Has anyone run into similar issue with keno-tabstrip in angular ?

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

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

There are 1 answers

2
mankers On

Honestly, I've never selected tab this way.

Try to use selected input. ([selected]="true").