React 和 antd 之 rowKey 问题
React 和 antd 之 rowKey 问题
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `Body`. See https://fb.me/react-warning-keys for more information.
解决办法: [ :rowKey ]
<!--id为 tableData 中的一个属性 --> <Table dataSource={this.state.tableData} columns={columns} rowKey={record => record.id} />; <Table dataSource={this.state.tableData} columns={columns} rowKey={columns => columns.id} />; <Table dataSource={this.state.tableData} columns={columns} rowKey="id" />;