File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -490,13 +490,15 @@ export default {
490
490
return getPopupContainer ;
491
491
}
492
492
// Use undefined to let rc component use default logic.
493
- return scroll && table ? ( ) => table . tableNode : undefined ;
493
+ return scroll && table ? ( ) => table . getTableNode ( ) : undefined ;
494
494
} ,
495
495
scrollToFirstRow ( ) {
496
496
const { scroll } = this . $props ;
497
497
if ( scroll && scroll . scrollToFirstRowOnChange !== false ) {
498
498
scrollTo ( 0 , {
499
- getContainer : ( ) => this . $refs . vcTable . bodyTable ,
499
+ getContainer : ( ) => {
500
+ return this . $refs . vcTable . getBodyTable ( ) ;
501
+ } ,
500
502
} ) ;
501
503
}
502
504
} ,
Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ const Table = {
20
20
ColumnGroup,
21
21
props : T . props ,
22
22
methods : {
23
+ getTableNode ( ) {
24
+ return this . $refs . table . tableNode ;
25
+ } ,
26
+ getBodyTable ( ) {
27
+ return this . $refs . table . ref_bodyTable ;
28
+ } ,
23
29
normalize ( elements = [ ] ) {
24
30
const columns = [ ] ;
25
31
elements . forEach ( element => {
@@ -63,6 +69,7 @@ const Table = {
63
69
columns,
64
70
} ,
65
71
on : getListeners ( this ) ,
72
+ ref : 'table' ,
66
73
} ;
67
74
return < T { ...tProps } /> ;
68
75
} ,
Original file line number Diff line number Diff line change @@ -51,8 +51,10 @@ const TableHeaderRow = {
51
51
}
52
52
53
53
headerCellProps . class = classNames (
54
- customProps . class || customProps . className ,
55
- column . class || column . className ,
54
+ customProps . class ,
55
+ customProps . className ,
56
+ column . class ,
57
+ column . className ,
56
58
{
57
59
[ `${ prefixCls } -align-${ column . align } ` ] : ! ! column . align ,
58
60
[ `${ prefixCls } -row-cell-ellipsis` ] : ! ! column . ellipsis ,
You can’t perform that action at this time.
0 commit comments