Tab cannot Refresh by DataSource Changed

Hi ,

https://stackblitz.com/edit/angular-v9vzyk?file=app.component.ts

HTML:

Ts:


When I click  'ADD', The 'tabList' will remove a record and add a record; but the tab cannot refresh



1 Reply 1 reply marked as answer

SK Satheesh Kumar Balasubramanian Syncfusion Team June 12, 2021 03:44 AM UTC

Hi Wills,

Thanks for using Syncfusion Products.

We have validated your reported query "tab cannot refresh by datasource changed" and let you know that tab is rendering properly when we use Array shift and push operation independently. We suggest you to use setTimeout for Array push operation to resolve the reported issue. For the same we have modified the sample for your reference which can be viewed from the following link.


app.component.ts:  
  
  onclick() {
    this.tabList.shift();
    setTimeout(() => {
      this.tabList.push({ id: 'd'name: 'DC' });
    }, 50);
    console.log(this.tabList);
  }


Kindly try the above sample and let us know if this meets your requirement.

Regards,
Satheesh Kumar B


Marked as answer
Loader.
Up arrow icon