-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Warning: Each child in a list should have a unique "key" prop; #6134
Comments
Thanks for reporting this. Please provide a sample application showing the issue by forking the following CodeSandbox (https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple). |
I confirm that I can't reproduce the problem with the simple example (where PostList renders a SimpleList on small screens). Could it be that some of the records in your list share the same id? |
I managed to reproduce the problem by slowing down the dataProvider. The problem lies in the |
what if the items do not have ids? This is my case and I get the same error in console |
@aenonGit As stated in the docs:
|
I got the error "Warning: Each child in a list should have a unique "key" prop;"
when I used the "SimpleList" component;
Example
<SimpleList
primaryText={record => record.email}
secondaryText={record => record.roleId}
tertiaryText={record => (record.isActive ? 'Active' : 'Inactive')}
linkType="edit"
/>
Environment
The text was updated successfully, but these errors were encountered: