Skip to content

Commit 35da3ff

Browse files
authored
fix data-row-key (#452)
1 parent 8099428 commit 35da3ff

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Body/BodyRow.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ function BodyRow<RecordType extends { children?: RecordType[] }>(props: BodyRowP
220220
<BodyRow
221221
{...props}
222222
key={subKey}
223+
rowKey={subKey}
223224
record={subRecord}
224225
recordKey={subKey}
225226
index={subIndex}

tests/__snapshots__/ExpandRow.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ exports[`Table.Expand childrenColumnName 1`] = `
5656
</tr>
5757
<tr
5858
class="rc-table-row rc-table-row-level-1"
59-
data-row-key="0"
59+
data-row-key="2"
6060
>
6161
<td
6262
class="rc-table-cell rc-table-cell-with-append"
@@ -327,7 +327,7 @@ exports[`Table.Expand renders tree row correctly 1`] = `
327327
</tr>
328328
<tr
329329
class="rc-table-row rc-table-row-level-1"
330-
data-row-key="0"
330+
data-row-key="2"
331331
>
332332
<td
333333
class="rc-table-cell rc-table-cell-with-append"

0 commit comments

Comments
 (0)