Specifying key for items in GridList (react-aria-components) #4431
-
|
When using the This is particularly important in my case because I am rendering the GridList's Here's the basic structure of my code: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Issue with importing react-aria-components is that the first version is 1.0.0-alpha.3 I'm surprised that the id is changing, we should be using whatever you specify if you have an id or key in your data set https://react-spectrum.adobe.com/react-stately/collections.html#unique-keys |
Beta Was this translation helpful? Give feedback.
This is a bug, this if statement shouldn't be there:
react-spectrum/packages/react-aria-components/src/Collection.tsx
Line 611 in 1a38c6f
In the meantime, it should be safe to remove the
keyfrom the<Item>element in this example because we already set the key on the item based on thekeyfrom the data.