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
name
• Optional
name: string
Inherited from
Omit.name
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
color
• Optional
color: string
Inherited from
Omit.color
value
• Optional
value: string
| number
| readonly string
[]
Inherited from
Omit.value
children
• Optional
children: ReactNode
Inherited from
Omit.children
cite
• Optional
cite: string
Inherited from
Omit.cite
data
• Optional
data: readonly D
[]
The data items to be rendered. If data is set, the total count will be inferred from the length of the array.
Inherited from
Omit.data
form
• Optional
form: string
Inherited from
Omit.form
slot
• Optional
slot: string
Inherited from
Omit.slot
span
• Optional
span: number
Inherited from
Omit.span
summary
• Optional
summary: string
Inherited from
Omit.summary
pattern
• Optional
pattern: string
Inherited from
Omit.pattern
as
• Optional
as: string
Inherited from
Omit.as
sandbox
• Optional
sandbox: string
Inherited from
Omit.sandbox
key
• Optional
key: Key
Inherited from
Omit.key
start
• Optional
start: number
Inherited from
Omit.start
onClick
• Optional
onClick: MouseEventHandler
<HTMLDivElement
>
Inherited from
Omit.onClick
tabIndex
• Optional
tabIndex: number
Inherited from
Omit.tabIndex
accept
• Optional
accept: string
Inherited from
Omit.accept
acceptCharset
• Optional
acceptCharset: string
Inherited from
Omit.acceptCharset
action
• Optional
action: string
Inherited from
Omit.action
allowFullScreen
• Optional
allowFullScreen: boolean
Inherited from
Omit.allowFullScreen
allowTransparency
• Optional
allowTransparency: boolean
Inherited from
Omit.allowTransparency
async
• Optional
async: boolean
Inherited from
Omit.async
autoComplete
• Optional
autoComplete: string
Inherited from
Omit.autoComplete
autoPlay
• Optional
autoPlay: boolean
Inherited from
Omit.autoPlay
capture
• Optional
capture: boolean
| "environment"
| "user"
Inherited from
Omit.capture
cellPadding
• Optional
cellPadding: string
| number
Inherited from
Omit.cellPadding
cellSpacing
• Optional
cellSpacing: string
| number
Inherited from
Omit.cellSpacing
charSet
• Optional
charSet: string
Inherited from
Omit.charSet
challenge
• Optional
challenge: string
Inherited from
Omit.challenge
checked
• Optional
checked: boolean
Inherited from
Omit.checked
classID
• Optional
classID: string
Inherited from
Omit.classID
cols
• Optional
cols: number
Inherited from
Omit.cols
colSpan
• Optional
colSpan: number
Inherited from
Omit.colSpan
controls
• Optional
controls: boolean
Inherited from
Omit.controls
coords
• Optional
coords: string
Inherited from
Omit.coords
crossOrigin
• Optional
crossOrigin: CrossOrigin
Inherited from
Omit.crossOrigin
dateTime
• Optional
dateTime: string
Inherited from
Omit.dateTime
default
• Optional
default: boolean
Inherited from
Omit.default
defer
• Optional
defer: boolean
Inherited from
Omit.defer
disabled
• Optional
disabled: boolean
Inherited from
Omit.disabled
download
• Optional
download: any
Inherited from
Omit.download
encType
• Optional
encType: string
Inherited from
Omit.encType