Add rowKey link into console warning message

This commit is contained in:
afc163 2017-02-07 15:32:44 +08:00
parent 168cec0dd1
commit 94f5a07f68

View File

@ -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;
}