Skip to content

Commit

Permalink
fix(virtual-core): add bigint to Key to align with @types/react imple…
Browse files Browse the repository at this point in the history
…mentation (#814)
  • Loading branch information
huv1k authored Aug 29, 2024
1 parent 41ca485 commit 1e12f81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/api/virtual-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `VirtualItem` object represents a single item returned by the virtualizer. I

```tsx
export interface VirtualItem {
key: string | number
key: string | number | bigint
index: number
start: number
end: number
Expand All @@ -19,7 +19,7 @@ The following properties and methods are available on each VirtualItem object:
### `key`

```tsx
key: string | number
key: string | number | bigint
```

The unique key for the item. By default this is the item index, but should be configured via the `getItemKey` Virtualizer option.
Expand Down
2 changes: 1 addition & 1 deletion packages/virtual-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface Range {
count: number
}

type Key = number | string
type Key = number | string | bigint

export interface VirtualItem {
key: Key
Expand Down

0 comments on commit 1e12f81

Please sign in to comment.