Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(virtual-core): add bigint to Key to align with @types/react implementation #814

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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