File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1866,7 +1866,7 @@ export default {
18661866 [ INSTANCE_METHODS . SCROLL_TO ] ( option ) {
18671867 scrollTo ( this . $refs [ this . tableContainerRef ] , option ) ;
18681868 } ,
1869- // table scroll to rowKey
1869+ // table scroll to rowKey position
18701870 [ INSTANCE_METHODS . SCROLL_TO_ROW_KEY ] ( { rowKey } ) {
18711871 if ( isEmptyValue ( rowKey ) ) {
18721872 console . warn ( "Row key can't be empty!" ) ;
@@ -1907,6 +1907,13 @@ export default {
19071907 behavior : "smooth" ,
19081908 } ) ;
19091909 } ,
1910+ // scroll to col key position
1911+ [ INSTANCE_METHODS . SCROLL_TO_COL_KEY ] ( { colKey } ) {
1912+ const column = getColumnByColkey ( colKey , this . colgroups ) ;
1913+ if ( column ) {
1914+ this . columnToVisible ( column ) ;
1915+ }
1916+ } ,
19101917 // start editing cell
19111918 [ INSTANCE_METHODS . START_EDITING_CELL ] ( {
19121919 rowKey,
Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ export const INSTANCE_METHODS = {
128128 SCROLL_TO : "scrollTo" ,
129129 // scroll to rowKey
130130 SCROLL_TO_ROW_KEY : "scrollToRowKey" ,
131+ // scroll to colKey
132+ SCROLL_TO_COL_KEY : "scrollToColKey" ,
131133 // start editing cell
132134 START_EDITING_CELL : "startEditingCell" ,
133135 // stop editing cell
You can’t perform that action at this time.
0 commit comments