virtua 0.41.3 → 0.41.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/react/VGrid.d.ts +5 -1
- package/lib/react/Virtualizer.d.ts +3 -1
- package/lib/react/useMergeRefs.d.ts +1 -0
- package/package.json +2 -2
package/lib/react/VGrid.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX, CSSProperties, ReactNode } from "react";
|
|
1
|
+
import { JSX, CSSProperties, ReactNode, Ref } from "react";
|
|
2
2
|
import { ViewportComponentAttributes } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Props of customized cell component for {@link VGrid}.
|
|
@@ -128,6 +128,10 @@ export interface VGridProps extends ViewportComponentAttributes {
|
|
|
128
128
|
* @defaultValue "div"
|
|
129
129
|
*/
|
|
130
130
|
item?: keyof JSX.IntrinsicElements | CustomCellComponent;
|
|
131
|
+
/** Reference to the rendered DOM element (the one that scrolls). */
|
|
132
|
+
domRef?: Ref<HTMLDivElement>;
|
|
133
|
+
/** Reference to the inner rendered DOM element (the one that contains all the cells). */
|
|
134
|
+
innerDomRef?: Ref<HTMLDivElement>;
|
|
131
135
|
/**
|
|
132
136
|
* Callback invoked whenever scroll offset changes.
|
|
133
137
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX, ReactElement, ReactNode, RefObject } from "react";
|
|
1
|
+
import { JSX, ReactElement, ReactNode, RefObject, Ref } from "react";
|
|
2
2
|
import { CacheSnapshot, ScrollToIndexOpts } from "../core";
|
|
3
3
|
import { CustomContainerComponent, CustomItemComponent } from "./types";
|
|
4
4
|
/**
|
|
@@ -70,6 +70,8 @@ export interface VirtualizerProps {
|
|
|
70
70
|
* If you set a function to {@link VirtualizerProps.children}, you have to set total number of items to this prop.
|
|
71
71
|
*/
|
|
72
72
|
count?: number;
|
|
73
|
+
/** Reference to the rendered DOM element. */
|
|
74
|
+
domRef?: Ref<HTMLDivElement>;
|
|
73
75
|
/**
|
|
74
76
|
* Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling.
|
|
75
77
|
* @defaultValue 4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virtua",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.4",
|
|
4
4
|
"description": "A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"virtua": "^0.41.2",
|
|
144
144
|
"vite": "5.1.8",
|
|
145
145
|
"vite-plugin-solid": "^2.11.6",
|
|
146
|
-
"vitest": "^
|
|
146
|
+
"vitest": "^3.0.0",
|
|
147
147
|
"vue": "^3.4.34",
|
|
148
148
|
"vue-eslint-parser": "^10.0.0",
|
|
149
149
|
"wait-on": "^8.0.3"
|