Skip to content

Commit

Permalink
fix(Tabs): incorrect line size after changing tabs direction
Browse files Browse the repository at this point in the history
issue -  #1435
  • Loading branch information
nekitk authored and gizeasy committed Aug 25, 2021
1 parent 10539c3 commit ee6616d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ export const Tabs: Tabs = React.forwardRef((props, ref) => {
multiple: false,
});

const tabsDirection = getTabsDirection(linePosition);
const isVertical = tabsDirection === 'vertical';
const tabRefs = useMemo(
() => new Array(items.length).fill(null).map(() => createRef<HTMLDivElement>()),
[items, fitMode],
[items, fitMode, isVertical],
);
const tabsDirection = getTabsDirection(linePosition);
const isVertical = tabsDirection === 'vertical';
const tabsDimensions = useResizeObserved(
tabRefs,
(el): TabDimensions => ({
Expand Down

0 comments on commit ee6616d

Please sign in to comment.