react-virtuoso 4.18.13 → 4.18.14
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/dist/index.d.ts +8 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare interface CalculateViewLocationParams {
|
|
|
65
65
|
* @see {@link VirtuosoProps.components} for usage in Virtuoso
|
|
66
66
|
* @group Virtuoso
|
|
67
67
|
*/
|
|
68
|
-
export declare interface Components<Data = unknown, Context = unknown> {
|
|
68
|
+
export declare interface Components<Data = unknown, Context = unknown, ListEl extends HTMLDivElement | HTMLUListElement = HTMLDivElement> {
|
|
69
69
|
/**
|
|
70
70
|
* Set to render a custom UI when the list is empty.
|
|
71
71
|
*/
|
|
@@ -91,7 +91,7 @@ export declare interface Components<Data = unknown, Context = unknown> {
|
|
|
91
91
|
/**
|
|
92
92
|
* Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
|
|
93
93
|
*/
|
|
94
|
-
List?: default_2.ComponentType<ListProps & ContextProp<Context>>;
|
|
94
|
+
List?: default_2.ComponentType<ListProps<ListEl> & ContextProp<Context>>;
|
|
95
95
|
/**
|
|
96
96
|
* Set to customize the outermost scrollable element. This should not be necessary in general,
|
|
97
97
|
* as the component passes its HTML attribute props to it.
|
|
@@ -244,7 +244,7 @@ export declare interface Gap {
|
|
|
244
244
|
* @see {@link VirtuosoGridProps.components} for usage in VirtuosoGrid
|
|
245
245
|
* @group VirtuosoGrid
|
|
246
246
|
*/
|
|
247
|
-
export declare interface GridComponents<Context = any> {
|
|
247
|
+
export declare interface GridComponents<Context = any, ListEl extends HTMLDivElement | HTMLUListElement = HTMLDivElement> {
|
|
248
248
|
/**
|
|
249
249
|
* Set to render a component at the bottom of the list.
|
|
250
250
|
*/
|
|
@@ -262,7 +262,7 @@ export declare interface GridComponents<Context = any> {
|
|
|
262
262
|
/**
|
|
263
263
|
* Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
|
|
264
264
|
*/
|
|
265
|
-
List?: default_2.ComponentType<GridListProps & ContextProp<Context>>;
|
|
265
|
+
List?: default_2.ComponentType<GridListProps<ListEl> & ContextProp<Context>>;
|
|
266
266
|
/**
|
|
267
267
|
* Set to customize the outermost scrollable element. This should not be necessary in general,
|
|
268
268
|
* as the component passes its HTML attribute props to it.
|
|
@@ -332,7 +332,7 @@ export declare type GridItemProps = Pick<default_2.ComponentProps<'div'>, 'child
|
|
|
332
332
|
* Passed to the GridComponents.List custom component
|
|
333
333
|
* @group VirtuosoGrid
|
|
334
334
|
*/
|
|
335
|
-
export declare type GridListProps = Pick<default_2.ComponentProps<'div'>, 'children' | 'className' | 'style'> & default_2.RefAttributes<
|
|
335
|
+
export declare type GridListProps<El extends HTMLDivElement | HTMLUListElement = HTMLDivElement> = Pick<default_2.ComponentProps<'div'>, 'children' | 'className' | 'style'> & default_2.RefAttributes<El> & {
|
|
336
336
|
'data-testid': string;
|
|
337
337
|
};
|
|
338
338
|
|
|
@@ -724,7 +724,7 @@ export declare type ListItem<Data> = GroupItem<Data> | RecordItem<Data>;
|
|
|
724
724
|
* Passed to the Components.List custom component
|
|
725
725
|
* @group Virtuoso
|
|
726
726
|
*/
|
|
727
|
-
export declare type ListProps = Pick<default_2.ComponentProps<'div'>, 'children' | 'style'> & default_2.RefAttributes<
|
|
727
|
+
export declare type ListProps<El extends HTMLDivElement | HTMLUListElement = HTMLDivElement> = Pick<default_2.ComponentProps<'div'>, 'children' | 'style'> & default_2.RefAttributes<El> & {
|
|
728
728
|
'data-testid': string;
|
|
729
729
|
};
|
|
730
730
|
|
|
@@ -1472,7 +1472,7 @@ export declare interface VirtuosoGridProps<Data, Context = unknown> extends Grid
|
|
|
1472
1472
|
/**
|
|
1473
1473
|
* Use the `components` property for advanced customization of the elements rendered by the list.
|
|
1474
1474
|
*/
|
|
1475
|
-
components?: GridComponents<Context>;
|
|
1475
|
+
components?: GridComponents<Context, any>;
|
|
1476
1476
|
/**
|
|
1477
1477
|
* If specified, the component will use the function to generate the `key` property for each list item.
|
|
1478
1478
|
*/
|
|
@@ -1700,7 +1700,7 @@ export declare interface VirtuosoProps<Data, Context> extends ListRootProps {
|
|
|
1700
1700
|
/**
|
|
1701
1701
|
* Use the `components` property for advanced customization of the elements rendered by the list.
|
|
1702
1702
|
*/
|
|
1703
|
-
components?: Components<Data, Context>;
|
|
1703
|
+
components?: Components<Data, Context, any>;
|
|
1704
1704
|
/**
|
|
1705
1705
|
* If specified, the component will use the function to generate the `key` property for each list item.
|
|
1706
1706
|
*/
|