-
Notifications
You must be signed in to change notification settings - Fork 622
Closed
Labels
Description
The key for <TableRow>
and it’s associated children is generated based off of the id
of the passed in data. It would be helpful to be able to customize the key that is used for id
since id
may not always exist in the data. For instance, I have a private _uid
field that I’d prefer to generate the key off of. In my case, the user has access to update the id
field so this may results in duplicate keys if they choose the same id
.
Example data:
const sampleData = [
{id: 1, name: 'Sabine', cuisine: 'Italian', location: 'New York', rating: 4.5, _uid: 'abc123'},
{id: 2, name: 'The Matador', cuisine: 'Mexican', location: 'Los Angeles', rating: 4.0, _uid: 'abc12334'},
{id: 3, name: 'Nagoya Steakhouse', cuisine: 'Japanese', location: 'San Francisco', rating: 4.2, _uid: 'abc1234'},
]