mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
update warning message
This commit is contained in:
parent
f22353cd2b
commit
e2b9e5d832
@ -626,7 +626,8 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
|
||||
const recordKey = (typeof rowKey === 'function') ?
|
||||
rowKey(record, index) : (record as any)[rowKey as string];
|
||||
warning(recordKey !== undefined,
|
||||
'Each record in dataSource of table should have a unique `key` prop, or set `rowKey` to an unique primary key,' +
|
||||
'Each record in dataSource of table should have a unique `key` prop, ' +
|
||||
'or set `rowKey` of Table to an unique primary key, ' +
|
||||
'see https://u.ant.design/table-row-key',
|
||||
);
|
||||
return recordKey === undefined ? index : recordKey;
|
||||
|
Loading…
Reference in New Issue
Block a user