@@ -471,6 +471,16 @@ const InteralTable = defineComponent<
471471 return mergedData . value . slice ( ( current - 1 ) * pageSize , current * pageSize ) ;
472472 } ) ;
473473
474+ const expandIconColumnIndex = computed ( ( ) => {
475+ // Adjust expand icon index, no overwrite expandIconColumnIndex if set.
476+ if ( expandType . value === 'nest' && props . expandIconColumnIndex === undefined ) {
477+ return props . rowSelection ? 1 : 0 ;
478+ } else if ( props . expandIconColumnIndex ! > 0 && props . rowSelection ) {
479+ return props . expandIconColumnIndex - 1 ;
480+ }
481+ return props . expandIconColumnIndex ;
482+ } ) ;
483+
474484 // ========================== Selections ==========================
475485 const [ transformSelectionColumns , selectedKeySet ] = useSelection (
476486 computed ( ( ) => props . rowSelection ) ,
@@ -483,7 +493,7 @@ const InteralTable = defineComponent<
483493 expandType,
484494 childrenColumnName,
485495 locale : tableLocale ,
486- expandIconColumnIndex : computed ( ( ) => props . expandIconColumnIndex ) ,
496+ expandIconColumnIndex,
487497 getPopupContainer : computed ( ( ) => props . getPopupContainer ) ,
488498 } ,
489499 ) ;
@@ -509,15 +519,6 @@ const InteralTable = defineComponent<
509519 expose ( {
510520 selectedKeySet,
511521 } ) ;
512- const expandIconColumnIndex = computed ( ( ) => {
513- // Adjust expand icon index, no overwrite expandIconColumnIndex if set.
514- if ( expandType . value === 'nest' && props . expandIconColumnIndex === undefined ) {
515- return props . rowSelection ? 1 : 0 ;
516- } else if ( props . expandIconColumnIndex ! > 0 && props . rowSelection ) {
517- return props . expandIconColumnIndex - 1 ;
518- }
519- return props . expandIconColumnIndex ;
520- } ) ;
521522
522523 const indentSize = computed ( ( ) => {
523524 // Indent size
0 commit comments