react-virtuoso
Advanced tools
Comparing version 4.3.11 to 4.6.2
@@ -88,2 +88,7 @@ import { default as React_2 } from 'react'; | ||
export declare interface ElementDimensions { | ||
width: number; | ||
height: number; | ||
} | ||
/** | ||
@@ -117,2 +122,7 @@ * Passed to the Components.FillerRow custom component | ||
export declare interface Gap { | ||
row: number; | ||
column: number; | ||
} | ||
export declare interface GridComponents<Context = any> { | ||
@@ -165,2 +175,4 @@ /** | ||
export declare type GridIndexLocation = FlatIndexLocationWithAlign | number; | ||
export declare interface GridItem<D> { | ||
@@ -198,2 +210,9 @@ index: number; | ||
export declare interface GridStateSnapshot { | ||
viewport: ElementDimensions; | ||
item: ElementDimensions; | ||
gap: Gap; | ||
scrollTop: number; | ||
} | ||
export declare interface GroupContent<C> { | ||
@@ -518,2 +537,6 @@ (index: number, context: C): React_2.ReactNode; | ||
scrollBy(location: ScrollToOptions): void; | ||
/** | ||
* Obtains the internal size state of the component, so that it can be restored later. This does not include the data items. | ||
*/ | ||
getState(stateCb: StateCallback): void; | ||
} | ||
@@ -696,2 +719,8 @@ | ||
atBottomThreshold?: number; | ||
/** | ||
* pass a state obtained from the getState() method to restore the list state - this includes the previously measured item sizes and the scroll location. | ||
* Notice that you should still pass the same data and totalCount properties as before, so that the list can match the data with the stored measurements. | ||
* This is useful when you want to keep the list state when the component is unmounted and remounted, for example when navigating to a different page. | ||
*/ | ||
restoreStateFrom?: StateSnapshot; | ||
} | ||
@@ -710,3 +739,3 @@ | ||
export declare interface VirtuosoGridHandle { | ||
scrollToIndex(location: number | IndexLocationWithAlign): void; | ||
scrollToIndex(location: GridIndexLocation): void; | ||
scrollTo(location: ScrollToOptions): void; | ||
@@ -788,2 +817,7 @@ scrollBy(location: ScrollToOptions): void; | ||
/** | ||
* reports when the grid state changes. The reported value can be stored and passed back to `restoreStateFrom` to restore the grid to the same state. | ||
*/ | ||
stateChanged?: (state: GridStateSnapshot) => void; | ||
restoreStateFrom?: GridStateSnapshot | undefined | null; | ||
/** | ||
* Called with true / false when the list has reached the bottom / gets scrolled up. | ||
@@ -823,2 +857,3 @@ * Can be used to load newer items, like `tail -f`. | ||
logLevel?: LogLevel; | ||
initialTopMostItemIndex?: GridIndexLocation; | ||
} | ||
@@ -825,0 +860,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "4.3.11", | ||
"version": "4.6.2", | ||
"homepage": "https://virtuoso.dev/", | ||
@@ -70,3 +70,2 @@ "license": "MIT", | ||
"@types/react-router-dom": "^5.3.3", | ||
"@types/react-table": "^7.7.14", | ||
"@typescript-eslint/eslint-plugin": "^5.59.2", | ||
@@ -91,2 +90,3 @@ "@typescript-eslint/parser": "^5.59.2", | ||
"playwright": "^1.33.0", | ||
"prettier": "^2.2.1", | ||
"prism-react-renderer": "^1.3.5", | ||
@@ -96,4 +96,4 @@ "react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-router-dom": "^6.11.1", | ||
"react-table": "^7.8.0", | ||
"react-router-dom": "^6.14.0", | ||
"@tanstack/react-table": "^8.9.11", | ||
"semantic-release": "^19.0.5", | ||
@@ -100,0 +100,0 @@ "terser": "^5.17.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248292
5471