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 {
490490 return getPopupContainer ;
491491 }
492492 // Use undefined to let rc component use default logic.
493- return scroll && table ? ( ) => table . tableNode : undefined ;
493+ return scroll && table ? ( ) => table . getTableNode ( ) : undefined ;
494494 } ,
495495 scrollToFirstRow ( ) {
496496 const { scroll } = this . $props ;
497497 if ( scroll && scroll . scrollToFirstRowOnChange !== false ) {
498498 scrollTo ( 0 , {
499- getContainer : ( ) => this . $refs . vcTable . bodyTable ,
499+ getContainer : ( ) => {
500+ return this . $refs . vcTable . getBodyTable ( ) ;
501+ } ,
500502 } ) ;
501503 }
502504 } ,
Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ const Table = {
2020 ColumnGroup,
2121 props : T . props ,
2222 methods : {
23+ getTableNode ( ) {
24+ return this . $refs . table . tableNode ;
25+ } ,
26+ getBodyTable ( ) {
27+ return this . $refs . table . ref_bodyTable ;
28+ } ,
2329 normalize ( elements = [ ] ) {
2430 const columns = [ ] ;
2531 elements . forEach ( element => {
@@ -63,6 +69,7 @@ const Table = {
6369 columns,
6470 } ,
6571 on : getListeners ( this ) ,
72+ ref : 'table' ,
6673 } ;
6774 return < T { ...tProps } /> ;
6875 } ,
Original file line number Diff line number Diff line change @@ -51,8 +51,10 @@ const TableHeaderRow = {
5151 }
5252
5353 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 ,
5658 {
5759 [ `${ prefixCls } -align-${ column . align } ` ] : ! ! column . align ,
5860 [ `${ prefixCls } -row-cell-ellipsis` ] : ! ! column . ellipsis ,
You can’t perform that action at this time.
0 commit comments