mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Fallback table record key to data index. (#4397)
In last PR #4185, we removed data index from record key, it leads to inconformity behavior.
This commit is contained in:
parent
f816455421
commit
29e4717fe3
@ -560,7 +560,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
|
||||
warning(recordKey !== undefined,
|
||||
'Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key.'
|
||||
);
|
||||
return recordKey;
|
||||
return recordKey === undefined ? index : recordKey;
|
||||
}
|
||||
|
||||
renderRowSelection() {
|
||||
|
Loading…
Reference in New Issue
Block a user