Browse Source

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
commit
29e4717fe3
  1. 2
      components/table/Table.tsx

2
components/table/Table.tsx

@ -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…
Cancel
Save