@@ -114,19 +114,19 @@ const baseFixedColumns = <T extends ModuleType<ColumnsView>>(Base: T) => class B
114114 }
115115 }
116116
117- private _partialUpdateFixedTable ( fixedColumns ) {
117+ private _partialUpdateFixedTable ( fixedColumns , rows ) {
118118 const fixedTableElement = this . _fixedTableElement ;
119119 const $rows = this . _getRowElementsCore ( fixedTableElement ) ;
120120 const $colgroup = fixedTableElement . children ( 'colgroup' ) ;
121121
122122 $colgroup . replaceWith ( this . _createColGroup ( fixedColumns ) ) ;
123123
124- for ( let i = 0 ; i < $ rows. length ; i ++ ) {
125- this . _partialUpdateFixedRow ( $ ( $rows [ i ] ) , fixedColumns ) ;
124+ for ( let i = 0 ; i < rows . length ; i ++ ) {
125+ this . _partialUpdateFixedRow ( $ ( $rows [ i ] ) , fixedColumns , rows [ i ] ) ;
126126 }
127127 }
128128
129- private _partialUpdateFixedRow ( $row , fixedColumns ) {
129+ private _partialUpdateFixedRow ( $row , fixedColumns , row ) {
130130 const cellElements = $row . get ( 0 ) . childNodes ;
131131 const transparentColumnIndex = getTransparentColumnIndex ( fixedColumns ) ;
132132 const transparentColumn = fixedColumns [ transparentColumnIndex ] ;
@@ -144,11 +144,23 @@ const baseFixedColumns = <T extends ModuleType<ColumnsView>>(Base: T) => class B
144144 if ( $row . hasClass ( GROUP_ROW_CLASS ) ) {
145145 // @ts -expect-error RowsView's method
146146 groupCellOptions = this . _getGroupCellOptions ( {
147- row : $row . data ( 'options' ) ,
147+ row,
148148 columns : this . _columnsController . getVisibleColumns ( ) ,
149149 } ) ;
150150
151- colspan = groupCellOptions . colspan - Math . max ( 0 , cellElements . length - ( groupCellOptions . columnIndex + 2 ) ) ;
151+ const hasSummary = row . summaryCells . length > 0 ;
152+ if ( hasSummary ) {
153+ // @ts -expect-error RowsView's method
154+ const alignByColumnCellCount = this . _getAlignByColumnCellCount ( groupCellOptions . colspan , {
155+ columns : this . _columnsController . getVisibleColumns ( ) ,
156+ row,
157+ isFixed : true ,
158+ } ) ;
159+
160+ colspan = groupCellOptions . colspan - alignByColumnCellCount ;
161+ } else {
162+ colspan = groupCellOptions . colspan - Math . max ( 0 , cellElements . length - ( groupCellOptions . columnIndex + 2 ) ) ;
163+ }
152164 }
153165
154166 for ( let j = 0 ; j < cellElements . length ; j ++ ) {
@@ -180,7 +192,7 @@ const baseFixedColumns = <T extends ModuleType<ColumnsView>>(Base: T) => class B
180192 this . _isFixedTableRendering = true ;
181193
182194 if ( needPartialUpdate && this . option ( 'scrolling.legacyMode' ) !== true ) {
183- this . _partialUpdateFixedTable ( fixedColumns ) ;
195+ this . _partialUpdateFixedTable ( fixedColumns , options ?. change ?. items ) ;
184196 this . _isFixedTableRendering = false ;
185197 } else {
186198 const columnIndices = change ?. columnIndices ;
@@ -301,14 +313,14 @@ const baseFixedColumns = <T extends ModuleType<ColumnsView>>(Base: T) => class B
301313 if ( options . row . summaryCells && options . row . summaryCells . length ) {
302314 const columns = this . _columnsController . getVisibleColumns ( ) ;
303315 // @ts -expect-error DataGrid's method
304- const alignByFixedColumnCellCount = this . _getAlignByColumnCellCount
305- // @ts -expect-error DataGrid's method
306- ? this . _getAlignByColumnCellCount ( column . colspan , {
316+ const alignByFixedColumnCellCount = this . _getAlignByColumnCellCount ?. (
317+ column . colspan ,
318+ {
307319 columns,
308320 row : options . row ,
309321 isFixed : true ,
310- } )
311- : 0 ;
322+ } ,
323+ ) ?? 0 ;
312324
313325 if ( alignByFixedColumnCellCount > 0 ) {
314326 const transparentColumnIndex = getTransparentColumnIndex ( this . _columnsController . getFixedColumns ( ) ) ;
0 commit comments