Skip to content

Commit c42115c

Browse files
author
Blueshift Staff
committed
Synced from the Blueshift Repository
1 parent 187e4db commit c42115c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

projects/ngx-grid-core/src/lib/controller/selection/operations/remove-orphaned-rows.operation.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export class RemoveOrphanedRows {
2727
if (orphanedRowKeys.has(cell.rowKey)) nextSelection.remove(cell)
2828
}
2929

30+
const focusedRowKey = this.controller.gridEvents.CellFocusChangedEvent.state?.rowKey?.toString() ?? null
31+
if (nextSelection.cellCount == 0 || focusedRowKey && orphanedRowKeys.has(focusedRowKey)) {
32+
this.controller.gridEvents.CellFocusChangedEvent.emit(undefined)
33+
}
34+
3035
this.controller.EmitNextSelection.run(nextSelection.cellCount > 0 ? nextSelection : null)
3136
this.controller.EmitNextSelectionSlice.run()
3237

0 commit comments

Comments
 (0)