From 29e4717fe3346b61cb3e59cbf3f4bd8271f226f3 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Fri, 30 Dec 2016 13:50:11 +0800 Subject: [PATCH] Fallback table record key to data index. (#4397) In last PR #4185, we removed data index from record key, it leads to inconformity behavior. --- components/table/Table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 4c69b6e8ab..41deb248a8 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -560,7 +560,7 @@ export default class Table extends React.Component, 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() {