Fallback table record key to data index. (#4397)

In last PR #4185, we removed data index from record key, it
leads to inconformity behavior.
pull/4430/head
Wei Zhu 8 years ago committed by ddcat1115
parent f816455421
commit 29e4717fe3

@ -560,7 +560,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
warning(recordKey !== undefined, 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.'
); );
return recordKey; return recordKey === undefined ? index : recordKey;
} }
renderRowSelection() { renderRowSelection() {

Loading…
Cancel
Save