@@ -48,6 +48,7 @@ export const SelectionRect = React.memo<SelectionContextType>(
4848 rowHeight,
4949 activeCell,
5050 hasStickyRightColumn,
51+ stickyFirstColumn,
5152 dataLength,
5253 viewWidth,
5354 viewHeight,
@@ -170,20 +171,22 @@ export const SelectionRect = React.memo<SelectionContextType>(
170171 } ) }
171172 style = { {
172173 top : headerRowHeight ,
173- left : columnWidths [ 0 ] ,
174+ left : columnWidths [ 0 ] + ( stickyFirstColumn ? columnWidths [ 1 ] : 0 ) ,
174175 height : viewHeight ? viewHeight - headerRowHeight : 0 ,
175176 width :
176177 contentWidth && viewWidth
177178 ? viewWidth -
178179 columnWidths [ 0 ] -
179180 ( hasStickyRightColumn
180181 ? columnWidths [ columnWidths . length - 1 ]
181- : 0 )
182+ : 0 ) -
183+ ( stickyFirstColumn ? columnWidths [ 1 ] : 0 )
182184 : `calc(100% - ${
183185 columnWidths [ 0 ] +
184186 ( hasStickyRightColumn
185187 ? columnWidths [ columnWidths . length - 1 ]
186- : 0 )
188+ : 0 ) +
189+ ( stickyFirstColumn ? columnWidths [ 1 ] : 0 )
187190 } px)`,
188191 } }
189192 />
@@ -232,6 +235,8 @@ export const SelectionRect = React.memo<SelectionContextType>(
232235 className = { cx ( 'dsg-active-cell' , {
233236 'dsg-active-cell-focus' : editing ,
234237 'dsg-active-cell-disabled' : activeCellIsDisabled ,
238+ 'dsg-active-cell-sticky-first' :
239+ stickyFirstColumn && activeCell . col === 0 ,
235240 } ) }
236241 style = { activeCellRect }
237242 />
@@ -253,18 +258,30 @@ export const SelectionRect = React.memo<SelectionContextType>(
253258 } }
254259 />
255260 ) }
256- { expandRowsRect && (
257- < div className = { cx ( 'dsg-expand-rows-rect' ) } style = { expandRowsRect } />
258- ) }
259261 { expandRowsIndicator && (
260262 < div
261263 className = { cx (
262264 'dsg-expand-rows-indicator' ,
263- selectionIsDisabled && 'dsg-expand-rows-indicator-disabled'
265+ selectionIsDisabled && 'dsg-expand-rows-indicator-disabled' ,
266+ stickyFirstColumn &&
267+ ( ( ! selection && activeCell ?. col === 0 ) ||
268+ selection ?. max . col === 0 ) &&
269+ 'dsg-expand-rows-indicator-sticky-first'
264270 ) }
265271 style = { expandRowsIndicator }
266272 />
267273 ) }
274+ { expandRowsRect && (
275+ < div
276+ className = { cx (
277+ 'dsg-expand-rows-rect' ,
278+ stickyFirstColumn &&
279+ activeCell ?. col === 0 &&
280+ 'dsg-expand-rows-rect-sticky-first'
281+ ) }
282+ style = { expandRowsRect }
283+ />
284+ ) }
268285 </ >
269286 )
270287 }
0 commit comments