Skip to content

Commit 0561b92

Browse files
committed
fix: Add missing className
1 parent 852038e commit 0561b92

File tree

4 files changed

+45
-19
lines changed

4 files changed

+45
-19
lines changed

src/Body/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function Body<RecordType>({
7777
);
7878
}
7979

80-
return <WrapperComponent>{rows}</WrapperComponent>;
80+
return <WrapperComponent className={`${prefixCls}-tbody`}>{rows}</WrapperComponent>;
8181
}, [
8282
data,
8383
prefixCls,

tests/__snapshots__/ExpandRow.spec.js.snap

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ exports[`Table.Expand childrenColumnName 1`] = `
3131
</th>
3232
</tr>
3333
</thead>
34-
<tbody>
34+
<tbody
35+
class="rc-table-tbody"
36+
>
3537
<tr
3638
class="rc-table-row rc-table-row-level-0"
3739
>
@@ -101,7 +103,7 @@ exports[`Table.Expand childrenColumnName 1`] = `
101103

102104
exports[`Table.Expand renders fixed column correctly 1`] = `
103105
<div
104-
class="rc-table rc-table-fixed-column"
106+
class="rc-table rc-table-fixed-column rc-table-has-fix-left rc-table-has-fix-right"
105107
>
106108
<div
107109
class="rc-table-container"
@@ -146,7 +148,9 @@ exports[`Table.Expand renders fixed column correctly 1`] = `
146148
</th>
147149
</tr>
148150
</thead>
149-
<tbody>
151+
<tbody
152+
class="rc-table-tbody"
153+
>
150154
<tr
151155
class="rc-table-row rc-table-row-level-0"
152156
>
@@ -277,7 +281,9 @@ exports[`Table.Expand renders tree row correctly 1`] = `
277281
</th>
278282
</tr>
279283
</thead>
280-
<tbody>
284+
<tbody
285+
class="rc-table-tbody"
286+
>
281287
<tr
282288
class="rc-table-row rc-table-row-level-0"
283289
>

tests/__snapshots__/FixedColumn.spec.js.snap

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Table.FixedColumn renders correctly scrollX - with data 1`] = `
44
<div
5-
class="rc-table rc-table-fixed-column"
5+
class="rc-table rc-table-fixed-column rc-table-has-fix-left rc-table-has-fix-right"
66
>
77
<div
88
class="rc-table-container"
@@ -101,7 +101,9 @@ exports[`Table.FixedColumn renders correctly scrollX - with data 1`] = `
101101
</th>
102102
</tr>
103103
</thead>
104-
<tbody>
104+
<tbody
105+
class="rc-table-tbody"
106+
>
105107
<tr
106108
class="rc-table-row rc-table-row-level-0"
107109
>
@@ -570,7 +572,7 @@ exports[`Table.FixedColumn renders correctly scrollX - with data 1`] = `
570572

571573
exports[`Table.FixedColumn renders correctly scrollX - without data 1`] = `
572574
<div
573-
class="rc-table rc-table-fixed-column"
575+
class="rc-table rc-table-fixed-column rc-table-has-fix-left rc-table-has-fix-right"
574576
>
575577
<div
576578
class="rc-table-container"
@@ -669,7 +671,9 @@ exports[`Table.FixedColumn renders correctly scrollX - without data 1`] = `
669671
</th>
670672
</tr>
671673
</thead>
672-
<tbody>
674+
<tbody
675+
class="rc-table-tbody"
676+
>
673677
<tr
674678
class="rc-table-placeholder"
675679
>
@@ -694,7 +698,7 @@ exports[`Table.FixedColumn renders correctly scrollX - without data 1`] = `
694698

695699
exports[`Table.FixedColumn renders correctly scrollXY - with data 1`] = `
696700
<div
697-
class="rc-table rc-table-fixed-header rc-table-fixed-column"
701+
class="rc-table rc-table-fixed-header rc-table-fixed-column rc-table-has-fix-left rc-table-has-fix-right"
698702
>
699703
<div
700704
class="rc-table-container"
@@ -825,7 +829,9 @@ exports[`Table.FixedColumn renders correctly scrollXY - with data 1`] = `
825829
style="width: 100px; min-width: 100px;"
826830
/>
827831
</colgroup>
828-
<tbody>
832+
<tbody
833+
class="rc-table-tbody"
834+
>
829835
<tr
830836
class="rc-table-row rc-table-row-level-0"
831837
>
@@ -1294,7 +1300,7 @@ exports[`Table.FixedColumn renders correctly scrollXY - with data 1`] = `
12941300

12951301
exports[`Table.FixedColumn renders correctly scrollXY - without data 1`] = `
12961302
<div
1297-
class="rc-table rc-table-fixed-column"
1303+
class="rc-table rc-table-fixed-column rc-table-has-fix-left rc-table-has-fix-right"
12981304
>
12991305
<div
13001306
class="rc-table-container"
@@ -1393,7 +1399,9 @@ exports[`Table.FixedColumn renders correctly scrollXY - without data 1`] = `
13931399
</th>
13941400
</tr>
13951401
</thead>
1396-
<tbody>
1402+
<tbody
1403+
class="rc-table-tbody"
1404+
>
13971405
<tr
13981406
class="rc-table-placeholder"
13991407
>

tests/__snapshots__/Table.spec.js.snap

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ exports[`Table.Basic custom components renders correctly 1`] = `
3232
</tr>
3333
</thead>
3434
<tbody
35+
class="rc-table-tbody"
3536
name="my-body-wrapper"
3637
>
3738
<tr
@@ -65,7 +66,7 @@ exports[`Table.Basic custom components renders correctly 1`] = `
6566

6667
exports[`Table.Basic custom components renders fixed column and header correctly 1`] = `
6768
<div
68-
class="rc-table rc-table-fixed-header rc-table-fixed-column"
69+
class="rc-table rc-table-fixed-header rc-table-fixed-column rc-table-has-fix-left rc-table-has-fix-right"
6970
>
7071
<div
7172
class="rc-table-container"
@@ -134,6 +135,7 @@ exports[`Table.Basic custom components renders fixed column and header correctly
134135
<col />
135136
</colgroup>
136137
<tbody
138+
class="rc-table-tbody"
137139
name="my-body-wrapper"
138140
>
139141
<tr
@@ -205,7 +207,9 @@ exports[`Table.Basic internal api transformColumns 1`] = `
205207
</th>
206208
</tr>
207209
</thead>
208-
<tbody>
210+
<tbody
211+
class="rc-table-tbody"
212+
>
209213
<tr
210214
class="rc-table-row rc-table-row-level-0"
211215
>
@@ -270,7 +274,9 @@ exports[`Table.Basic renders colSpan correctly 1`] = `
270274
</th>
271275
</tr>
272276
</thead>
273-
<tbody>
277+
<tbody
278+
class="rc-table-tbody"
279+
>
274280
<tr
275281
class="rc-table-row rc-table-row-level-0"
276282
>
@@ -327,7 +333,9 @@ exports[`Table.Basic renders correctly 1`] = `
327333
</th>
328334
</tr>
329335
</thead>
330-
<tbody>
336+
<tbody
337+
class="test-prefix-tbody"
338+
>
331339
<tr
332340
class="test-prefix-row test-prefix-row-level-0"
333341
>
@@ -384,7 +392,9 @@ exports[`Table.Basic renders rowSpan correctly 1`] = `
384392
</th>
385393
</tr>
386394
</thead>
387-
<tbody>
395+
<tbody
396+
class="rc-table-tbody"
397+
>
388398
<tr
389399
class="rc-table-row rc-table-row-level-0"
390400
>
@@ -448,7 +458,9 @@ exports[`Table.Basic syntactic sugar 1`] = `
448458
</th>
449459
</tr>
450460
</thead>
451-
<tbody>
461+
<tbody
462+
class="rc-table-tbody"
463+
>
452464
<tr
453465
class="rc-table-placeholder"
454466
>

0 commit comments

Comments
 (0)