Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump @types/react from 17.0.71 to 18.2.42 #690

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@types/enzyme": "^3.10.5",
"@types/jest": "^29.4.0",
"@types/keyv": "4.2.0",
"@types/react": "^17.0.14",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.0.11",
"@umijs/fabric": "^2.3.1",
"coveralls": "^3.0.6",
Expand Down
4 changes: 2 additions & 2 deletions src/TabNavList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/exhaustive-deps */
import classNames from 'classnames';
import ResizeObserver from 'rc-resize-observer';
import useEvent from 'rc-util/lib/hooks/useEvent';
Expand Down Expand Up @@ -399,13 +400,12 @@ const TabNavList = React.forwardRef<HTMLDivElement, TabNavListProps>((props, ref
// ========================= Effect ========================
useEffect(() => {
scrollToTab();
// eslint-disable-next-line
}, [
activeKey,
transformMin,
transformMax,
stringify(activeTabOffset),
stringify(tabOffsets),
stringify(tabOffsets as any),
tabPositionTopOrBottom,
]);

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useOffsets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Tab, TabOffset, TabOffsetMap, TabSizeMap } from '../interface';
const DEFAULT_SIZE = { width: 0, height: 0, left: 0, top: 0 };

export default function useOffsets(tabs: Tab[], tabSizes: TabSizeMap, holderScrollWidth: number) {
return useMemo(() => {
return useMemo<TabOffsetMap>(() => {
const map: TabOffsetMap = new Map();

const lastOffset = tabSizes.get(tabs[0]?.key) || DEFAULT_SIZE;
Expand Down
Loading