Skip to content

Commit

Permalink
fix(material/tabs): avoid unnecessary updates of tab ink bar (#27031)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-stepanenko authored May 8, 2023
1 parent 646fc98 commit a1e7de9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/material/tabs/ink-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export class MatInkBar {
const correspondingItem = this._items.find(item => item.elementRef.nativeElement === element);
const currentItem = this._currentItem;

if (correspondingItem === currentItem) {
return;
}

currentItem?.deactivateInkBar();

if (correspondingItem) {
Expand Down

0 comments on commit a1e7de9

Please sign in to comment.