Interface: GroupedVirtuosoProps<D, C>
Type parameters
Name |
---|
D |
C |
Hierarchy
-
Omit
<VirtuosoProps
<D
,C
>,"totalCount"
|"itemContent"
>↳
GroupedVirtuosoProps
Properties
groupCounts
• Optional
groupCounts: number
[]
Specifies the amount of items in each group (and, actually, how many groups are there). For example, passing [20, 30] will display 2 groups with 20 and 30 items each.
groupContent
• Optional
groupContent: GroupContent
<C
>
Specifies how each each group header gets rendered. The callback receives the zero-based index of the group.
itemContent
• Optional
itemContent: GroupItemContent
<D
, C
>
Specifies how each each item gets rendered.
firstItemIndex
• Optional
firstItemIndex: number
Use when implementing inverse infinite scrolling, decrease the value this property
in combination with a change in groupCounts
to prepend groups items to the top of the list.
Both new groups and extending the top group is supported.
The delta of the firstItemIndex should equal the amount of new items introduced, without the group themselves. As an example, if you prepend 2 groups with 20 and 30 items each, the firstItemIndex should be decreased with 50.
You can also prepend more items to the first group, for example:
{ groupCounts: [20, 30], firstItemIndex: 1000 }
can become { groupCounts: [10, 30, 30], firstItemIndex: 980 }
Warning: the firstItemIndex should be a positive number, based on the total amount of items to be displayed.
Overrides
Omit.firstItemIndex
className
• Optional
className: string
Inherited from
Omit.className
type
• Optional
type: string
Inherited from
Omit.type
label
• Optional
label: string
Inherited from
Omit.label
id
• Optional
id: string
Inherited from
Omit.id
href
• Optional
href: string
Inherited from
Omit.href
title
• Optional
title: string
Inherited from
Omit.title
kind
• Optional
kind: string
Inherited from
Omit.kind
style
• Optional
style: CSSProperties
Inherited from
Omit.style
alt
• Optional
alt: string
Inherited from
Omit.alt
src
• Optional
src: string
Inherited from
Omit.src
width
• Optional
width: string
| number
Inherited from
Omit.width
height
• Optional
height: string
| number
Inherited from
Omit.height
target
• Optional
target: string
Inherited from
Omit.target