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

On expand Row Table "Warning: Each child in a list should have a unique "key" prop." #37260

Closed
marksoft92 opened this issue Aug 26, 2022 · 3 comments
Labels
🤔 Need Reproduce We cannot reproduce your problem

Comments

@marksoft92
Copy link

marksoft92 commented Aug 26, 2022

Reproduction link

https://ant.design/components/table/

Steps to reproduce

variantActive[row.id] ? 'isExpand' : ''} expandable={{ expandedRowKeys: Object.keys(variantActive).map(Number), expandIcon: () => '', expandedRowRender: row => }} />

What is expected?

How deleteing " Warning: Each child in a list should have a unique "key" prop." on Table.expandedRowRender

What is actually happening?

react_devtools_backend.js:4026 Warning: Each child in a list should have a unique "key" prop.

Check the render method of VariantItemComponent. See https://reactjs.org/link/warning-keys for more information.

Environment Info
antd 4.21.6
React 17
System windows10
Browser Chrome Version 104.0.5112.101 (Official Build) (x86_64)

When I expand a table, I get the warning "Warning: Each child on the list should have a unique" prop key. my table has rowKey but expand row is missing and i don't know how to add key to row

@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2022

@marksoft92
Copy link
Author

marksoft92 commented Aug 26, 2022

You may look for issues:

  1. 72% Each record in table should have a unique key prop,or set rowKey to an unique primary key. #7623

🤖 By issues-similarity-analysis

^^ i need unique key for expanted rows in table

@MadCcc MadCcc added the 🤔 Need Reproduce We cannot reproduce your problem label Aug 26, 2022
@github-actions
Copy link
Contributor

Hello @marksoft92. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @marksoft92, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 Need Reproduce We cannot reproduce your problem
Projects
None yet
Development

No branches or pull requests

2 participants