diff --git a/packages/core/src/components/tabs/tabs.tsx b/packages/core/src/components/tabs/tabs.tsx index 6e54c725a4..184ffc0795 100644 --- a/packages/core/src/components/tabs/tabs.tsx +++ b/packages/core/src/components/tabs/tabs.tsx @@ -164,7 +164,7 @@ export class Tabs extends AbstractPureComponent2 { } public componentDidMount() { - this.moveSelectionIndicator(); + this.moveSelectionIndicator(false); } public componentDidUpdate(prevProps: ITabsProps, prevState: ITabsState) { @@ -266,7 +266,7 @@ export class Tabs extends AbstractPureComponent2 { * Calculate the new height, width, and position of the tab indicator. * Store the CSS values so the transition animation can start. */ - private moveSelectionIndicator() { + private moveSelectionIndicator(animate = true) { if (this.tablistElement == null || !this.props.animate) { return; } @@ -282,6 +282,10 @@ export class Tabs extends AbstractPureComponent2 { transform: `translateX(${Math.floor(offsetLeft)}px) translateY(${Math.floor(offsetTop)}px)`, width: clientWidth, }; + + if (!animate) { + indicatorWrapperStyle.transition = "none"; + } } this.setState({ indicatorWrapperStyle }); }