feat(VirtualList): add isLoading prop
This commit is contained in:
@@ -101,13 +101,25 @@ interface Props {
|
|||||||
* @template T - The type of items in the list
|
* @template T - The type of items in the list
|
||||||
*/
|
*/
|
||||||
children: Snippet<
|
children: Snippet<
|
||||||
[{ item: T; index: number; isFullyVisible: boolean; isPartiallyVisible: boolean; proximity: number }]
|
[
|
||||||
|
{
|
||||||
|
item: T;
|
||||||
|
index: number;
|
||||||
|
isFullyVisible: boolean;
|
||||||
|
isPartiallyVisible: boolean;
|
||||||
|
proximity: number;
|
||||||
|
},
|
||||||
|
]
|
||||||
>;
|
>;
|
||||||
/**
|
/**
|
||||||
* Whether to use the window as the scroll container.
|
* Whether to use the window as the scroll container.
|
||||||
* @default false
|
* @default false
|
||||||
*/
|
*/
|
||||||
useWindowScroll?: boolean;
|
useWindowScroll?: boolean;
|
||||||
|
/**
|
||||||
|
* Flag to show loading state
|
||||||
|
*/
|
||||||
|
isLoading?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
let {
|
let {
|
||||||
@@ -120,6 +132,7 @@ let {
|
|||||||
onNearBottom,
|
onNearBottom,
|
||||||
children,
|
children,
|
||||||
useWindowScroll = false,
|
useWindowScroll = false,
|
||||||
|
isLoading = false,
|
||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
// Reference to the ScrollArea viewport element for attaching the virtualizer
|
// Reference to the ScrollArea viewport element for attaching the virtualizer
|
||||||
|
|||||||
Reference in New Issue
Block a user