Skip to content

Commit

Permalink
fix: Avoid 'key prop spread into JSX' warning.
Browse files Browse the repository at this point in the history
React 18.3 detects `key` being spread and doesn't like it.
  • Loading branch information
stephenh committed Oct 18, 2024
1 parent 72c7dae commit 11331a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inputs/internal/VirtualizedOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function VirtualizedOptions<O>(props: VirtualizedOptionsProps<O>) {
// otherwise render just 1 row. A better way to do this would be to jest.mock
// out Virtuoso with an impl that just rendered everything, but doing this for now.
initialItemCount: items.length,
key: items.length,
itemsCount: items.length,
}
: {
// Ensure the selected item is visible when the list renders
Expand Down

0 comments on commit 11331a4

Please sign in to comment.