,
+ props: T,
index: number,
cache: ReturnType
) => number
@@ -54,10 +50,10 @@ export type ListItemSizer> = (
export type GetEstimatedTotalSize<
T,
P extends InitCacheFunc
-> = (props: ExtractPropTypes, cache: ReturnType) => number
+> = (props: T, cache: ReturnType
) => number
export type GetOffset> = (
- props: ExtractPropTypes,
+ props: T,
idx: number,
alignment: Alignment,
offset: number,
@@ -67,24 +63,21 @@ export type GetOffset> = (
export type GetStartIndexForOffset<
T,
P extends InitCacheFunc
-> = (props: ExtractPropTypes, offset: number, cache: ReturnType) => number
+> = (props: T, offset: number, cache: ReturnType
) => number
export type GetStopIndexForStartIndex<
T,
P extends InitCacheFunc
> = (
- props: ExtractPropTypes,
+ props: T,
startIndex: number,
scrollOffset: number,
cache: ReturnType
) => number
-export type PropValidator = (props: ExtractPropTypes) => void
+export type PropValidator = (props: T) => void
-export type InitCacheFunc = (
- props: ExtractPropTypes,
- cache: Instance
-) => P
+export type InitCacheFunc = (props: T, cache: Instance) => P
export type InitListCacheFunc = InitCacheFunc
export type InitGridCacheFunc = InitCacheFunc
@@ -110,8 +103,8 @@ export type ExposesStates = {
}
export type SharedExposes = {
- windowRef: HTMLElement
- innerRef: HTMLElement
+ windowRef: Ref
+ innerRef: Ref
getItemStyleCache: (_: any, __: any, ___: any) => CSSProperties
}
@@ -139,8 +132,12 @@ export type GridExposes = {
) => void
} & SharedExposes
+export type ScrollbarExpose = {
+ onMouseUp: () => void
+}
+
export type GetGridOffset> = (
- props: ExtractPropTypes,
+ props: T,
index: number,
alignment: Alignment,
offset: number,
@@ -149,7 +146,7 @@ export type GetGridOffset> = (
) => number
export type GetPosition> = (
- props: ExtractPropTypes,
+ props: T,
index: number,
cache: ReturnType
) => [number, number]
diff --git a/packages/theme-chalk/src/virtual-list.scss b/packages/theme-chalk/src/virtual-list.scss
index 8247cf962a..65dce2675e 100644
--- a/packages/theme-chalk/src/virtual-list.scss
+++ b/packages/theme-chalk/src/virtual-list.scss
@@ -6,3 +6,9 @@
position: relative;
}
}
+
+@include b(vg) {
+ @include e(wrapper) {
+ position: relative;
+ }
+}