mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Add rowKey link into console warning message
This commit is contained in:
parent
168cec0dd1
commit
94f5a07f68
@ -568,7 +568,8 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
|
||||
const recordKey = (typeof rowKey === 'function') ?
|
||||
rowKey(record, index) : record[rowKey as string];
|
||||
warning(recordKey !== undefined,
|
||||
'Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key.'
|
||||
'Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key,' +
|
||||
'see http://u.ant.design/table-row-key'
|
||||
);
|
||||
return recordKey === undefined ? index : recordKey;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user