Skip to content

Commit

Permalink
fix(Tab): indicator with initial index (#3564)
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitBhalla committed Jun 25, 2022
1 parent 172499f commit 8a44601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/base/src/Tab/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ export const TabBase: RneFunctionComponent<TabProps> = ({
inputRange,
outputRange: [0, ...outputRange],
});
}, [animationRef, validChildren]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationRef, validChildren, tabItemPositions.current.length]);

const WIDTH = React.useMemo(() => {
return tabItemPositions.current[value]?.width;
Expand Down

0 comments on commit 8a44601

Please sign in to comment.