File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 55 useState ,
66 type CSSProperties
77} from "react" ;
8+ import { useCachedBounds } from "../hooks/useCachedBounds" ;
89import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect" ;
910import { useResizeObserver } from "../hooks/useResizeObserver" ;
1011import { useStableCallback } from "../hooks/useStableCallback" ;
@@ -15,7 +16,6 @@ import { getEstimatedSize as getEstimatedSizeUtil } from "./getEstimatedSize";
1516import { getOffsetForIndex } from "./getOffsetForIndex" ;
1617import { getStartStopIndices as getStartStopIndicesUtil } from "./getStartStopIndices" ;
1718import type { Direction , SizeFunction } from "./types" ;
18- import { useCachedBounds } from "./useCachedBounds" ;
1919import { useItemSize } from "./useItemSize" ;
2020
2121export function useVirtualizer < Props extends object > ( {
Original file line number Diff line number Diff line change 11import { renderHook } from "@testing-library/react" ;
22import { describe , expect , test } from "vitest" ;
33import { EMPTY_OBJECT } from "../../src/constants" ;
4- import { useCachedBounds } from "./useCachedBounds" ;
4+ import { useCachedBounds } from "../hooks /useCachedBounds" ;
55
66describe ( "useCachedBounds" , ( ) => {
77 test ( "should cache the CachedBounds unless props change" , ( ) => {
Original file line number Diff line number Diff line change 11import { useMemo } from "react" ;
2- import { createCachedBounds } from "./createCachedBounds" ;
3- import type { CachedBounds , SizeFunction } from "./types" ;
2+ import { createCachedBounds } from "../core /createCachedBounds" ;
3+ import type { CachedBounds , SizeFunction } from "../core /types" ;
44
55export function useCachedBounds < Props extends object > ( {
66 itemCount,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export {
1313 type ListProps ,
1414 type RowComponentProps
1515} from "./components/list/types" ;
16+ export { useCachedBounds } from "./hooks/useCachedBounds" ;
1617export { useDynamicRowHeight } from "./components/list/useDynamicRowHeight" ;
1718export { useListCallbackRef } from "./components/list/useListCallbackRef" ;
1819export { useListRef } from "./components/list/useListRef" ;
You can’t perform that action at this time.
0 commit comments