scania-digital-design-system / tegel

Tegel Design System
https://tegel.scania.com
MIT License
17 stars 13 forks source link

tds-inline-tabs styling and indexing is corrupted if new data is pushed #662

Closed WaleedFaridi07 closed 1 month ago

WaleedFaridi07 commented 3 months ago

Requirements before reporting

Package versions

@scania/tegel-angular-17 v1.8.2

Browser

Chrome

Framework

Angular

Version

Angular 17

Reproduction steps

  1. Add component x
  2. Click y
  3. Do z ...

Code example

<tds-inline-tabs [selected-index]="selectedTab" ngIf="loaded"> <tds-inline-tab ngFor="let productType of productTypes; let i = index"> <button (click)="onTabClick(i, productType.id)">{{productType.name}}

Screenshots

image

Expected behaviour

Whenever new data is pushed tabs styling and indexing should not be corrupted

Console errors

if we try to use *ngIf so that dom is refreshed we get two console errors as shown in the screenshot above.

Contact information

waleed.ahmad.faridi@scania.com

theJohnnyMe commented 2 months ago

@WaleedFaridi07 - I have tested the behavior here: https://github.com/scania-digital-design-system/tegel-angular-17-demo/pull/12

I have trouble reproducing the bug you mentioned. Can you please take a look and let me know if I am doing anything different than scenario you have?

theJohnnyMe commented 1 month ago

Release 1.13.0 has a fix for this. The user tested and confirmed that the fix mitigated the issue.