File tree Expand file tree Collapse file tree 4 files changed +55
-19
lines changed Expand file tree Collapse file tree 4 files changed +55
-19
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,15 @@ function Header<RecordType>({
94
94
flattenColumns,
95
95
onHeaderRow,
96
96
} : HeaderProps < RecordType > ) : React . ReactElement {
97
- const { getComponent } = React . useContext ( TableContext ) ;
97
+ const { prefixCls , getComponent } = React . useContext ( TableContext ) ;
98
98
const rows : CellType < RecordType > [ ] [ ] = React . useMemo ( ( ) => parseHeaderRows ( columns ) , [ columns ] ) ;
99
99
100
100
const WrapperComponent = getComponent ( [ 'header' , 'wrapper' ] , 'thead' ) ;
101
101
const trComponent = getComponent ( [ 'header' , 'row' ] , 'tr' ) ;
102
102
const thComponent = getComponent ( [ 'header' , 'cell' ] , 'th' ) ;
103
103
104
104
return (
105
- < WrapperComponent >
105
+ < WrapperComponent className = { ` ${ prefixCls } -thead` } >
106
106
{ rows . map ( ( row , rowIndex ) => {
107
107
const rowNode = (
108
108
< HeaderRow
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ exports[`Table.Expand childrenColumnName 1`] = `
17
17
<col />
18
18
<col />
19
19
</colgroup >
20
- <thead >
20
+ <thead
21
+ class = " rc-table-thead"
22
+ >
21
23
<tr >
22
24
<th
23
25
class = " rc-table-cell"
@@ -126,7 +128,9 @@ exports[`Table.Expand renders fixed column correctly work 1`] = `
126
128
<col />
127
129
<col />
128
130
</colgroup >
129
- <thead >
131
+ <thead
132
+ class = " rc-table-thead"
133
+ >
130
134
<tr >
131
135
<th
132
136
class = " rc-table-cell rc-table-row-expand-icon-cell rc-table-cell-fix-left"
@@ -290,7 +294,9 @@ exports[`Table.Expand renders tree row correctly 1`] = `
290
294
<col />
291
295
<col />
292
296
</colgroup >
293
- <thead >
297
+ <thead
298
+ class = " rc-table-thead"
299
+ >
294
300
<tr >
295
301
<th
296
302
class = " rc-table-cell"
@@ -394,7 +400,9 @@ exports[`Table.Expand renders tree row correctly with different children 1`] = `
394
400
<col />
395
401
<col />
396
402
</colgroup >
397
- <thead >
403
+ <thead
404
+ class = " rc-table-thead"
405
+ >
398
406
<tr >
399
407
<th
400
408
class = " rc-table-cell"
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ exports[`Table.FixedColumn fixed column renders correctly RTL 1`] = `
33
33
style = " width: 100px; min-width: 100px;"
34
34
/>
35
35
</colgroup >
36
- <thead >
36
+ <thead
37
+ class = " rc-table-thead"
38
+ >
37
39
<tr >
38
40
<th
39
41
class = " rc-table-cell rc-table-cell-fix-right"
@@ -612,7 +614,9 @@ exports[`Table.FixedColumn renders correctly scrollX - with data 1`] = `
612
614
style = " width: 100px; min-width: 100px;"
613
615
/>
614
616
</colgroup >
615
- <thead >
617
+ <thead
618
+ class = " rc-table-thead"
619
+ >
616
620
<tr >
617
621
<th
618
622
class = " rc-table-cell rc-table-cell-fix-left"
@@ -1233,7 +1237,9 @@ exports[`Table.FixedColumn renders correctly scrollX - without data 1`] = `
1233
1237
style = " width: 100px; min-width: 100px;"
1234
1238
/>
1235
1239
</colgroup >
1236
- <thead >
1240
+ <thead
1241
+ class = " rc-table-thead"
1242
+ >
1237
1243
<tr >
1238
1244
<th
1239
1245
class = " rc-table-cell rc-table-cell-fix-left"
@@ -1400,7 +1406,9 @@ exports[`Table.FixedColumn renders correctly scrollXY - with data 1`] = `
1400
1406
style = " width: 15px; min-width: 15px;"
1401
1407
/>
1402
1408
</colgroup >
1403
- <thead >
1409
+ <thead
1410
+ class = " rc-table-thead"
1411
+ >
1404
1412
<tr >
1405
1413
<th
1406
1414
class = " rc-table-cell rc-table-cell-fix-left"
@@ -2054,7 +2062,9 @@ exports[`Table.FixedColumn renders correctly scrollXY - without data 1`] = `
2054
2062
style = " width: 100px; min-width: 100px;"
2055
2063
/>
2056
2064
</colgroup >
2057
- <thead >
2065
+ <thead
2066
+ class = " rc-table-thead"
2067
+ >
2058
2068
<tr >
2059
2069
<th
2060
2070
class = " rc-table-cell rc-table-cell-fix-left"
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ exports[`Table.Basic custom components renders correctly 1`] = `
18
18
<col />
19
19
</colgroup >
20
20
<thead
21
+ class = " rc-table-thead"
21
22
name = " my-header-wrapper"
22
23
>
23
24
<tr
@@ -89,6 +90,7 @@ exports[`Table.Basic custom components renders fixed column and header correctly
89
90
/>
90
91
</colgroup >
91
92
<thead
93
+ class = " rc-table-thead"
92
94
name = " my-header-wrapper"
93
95
>
94
96
<tr
@@ -213,7 +215,9 @@ exports[`Table.Basic custom components scroll content with scroll 1`] = `
213
215
style = " width: 15px; min-width: 15px;"
214
216
/>
215
217
</colgroup >
216
- <thead >
218
+ <thead
219
+ class = " rc-table-thead"
220
+ >
217
221
<tr >
218
222
<th
219
223
class = " rc-table-cell"
@@ -253,7 +257,9 @@ exports[`Table.Basic internal api transformColumns 1`] = `
253
257
<col />
254
258
<col />
255
259
</colgroup >
256
- <thead >
260
+ <thead
261
+ class = " rc-table-thead"
262
+ >
257
263
<tr >
258
264
<th
259
265
class = " rc-table-cell"
@@ -331,7 +337,9 @@ exports[`Table.Basic renders colSpan correctly 1`] = `
331
337
<col />
332
338
<col />
333
339
</colgroup >
334
- <thead >
340
+ <thead
341
+ class = " rc-table-thead"
342
+ >
335
343
<tr >
336
344
<th
337
345
class = " rc-table-cell"
@@ -393,7 +401,9 @@ exports[`Table.Basic renders correctly RTL 1`] = `
393
401
<colgroup >
394
402
<col />
395
403
</colgroup >
396
- <thead >
404
+ <thead
405
+ class = " test-prefix-thead"
406
+ >
397
407
<tr >
398
408
<th
399
409
class = " test-prefix-cell"
@@ -448,7 +458,9 @@ exports[`Table.Basic renders correctly basic 1`] = `
448
458
<colgroup >
449
459
<col />
450
460
</colgroup >
451
- <thead >
461
+ <thead
462
+ class = " test-prefix-thead"
463
+ >
452
464
<tr >
453
465
<th
454
466
class = " test-prefix-cell"
@@ -503,7 +515,9 @@ exports[`Table.Basic renders correctly no columns 1`] = `
503
515
<colgroup >
504
516
<col />
505
517
</colgroup >
506
- <thead >
518
+ <thead
519
+ class = " rc-table-thead"
520
+ >
507
521
<tr >
508
522
<th
509
523
class = " rc-table-cell"
@@ -553,7 +567,9 @@ exports[`Table.Basic renders rowSpan correctly 1`] = `
553
567
<col />
554
568
<col />
555
569
</colgroup >
556
- <thead >
570
+ <thead
571
+ class = " rc-table-thead"
572
+ >
557
573
<tr >
558
574
<th
559
575
class = " rc-table-cell"
@@ -619,7 +635,9 @@ exports[`Table.Basic syntactic sugar 1`] = `
619
635
<colgroup >
620
636
<col />
621
637
</colgroup >
622
- <thead >
638
+ <thead
639
+ class = " rc-table-thead"
640
+ >
623
641
<tr >
624
642
<th
625
643
class = " rc-table-cell"
You can’t perform that action at this time.
0 commit comments