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:
Wei Zhu 2016-12-30 13:50:11 +08:00 committed by ddcat1115
parent f816455421
commit 29e4717fe3

View File

@ -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() {