Skip to content

Commit 1d056cf

Browse files
committed
feat(tab-nav-drawer): Disable animation. #7157
1 parent 6996c2a commit 1d056cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

projects/igniteui-angular/src/lib/tabs/tabs.component.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ export class IgxTabsComponent implements IgxTabsBase, AfterViewInit, OnDestroy {
245245
*/
246246
public visibleItemsWidth: number;
247247

248+
/**
249+
* @hidden
250+
*/
251+
@Input()
252+
public enableAnimation = true;
253+
248254
/**
249255
* @hidden
250256
*/
@@ -462,13 +468,14 @@ export class IgxTabsComponent implements IgxTabsBase, AfterViewInit, OnDestroy {
462468
this.onTabItemSelected.emit({ tab: newTab, group: newTabRelatedGroup });
463469

464470
requestAnimationFrame(() => {
471+
const transitionDuration = this.enableAnimation ? 0.2 : 0;
465472
// bring the new selected tab into view if it is not
466473
this.bringNewTabIntoView(newTab);
467474
// animate the new selection indicator
468475
this.transformIndicatorAnimation(newTab.nativeTabItem.nativeElement);
469476
// animate the new tab's group content
470477
if (!this.hasContentTabs) {
471-
this.transformContentAnimation(newTab, 0.2);
478+
this.transformContentAnimation(newTab, transitionDuration);
472479
}
473480
});
474481
}

0 commit comments

Comments
 (0)