mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 20:16:49 +00:00
fix: clear selection if row deleted is included
Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
@@ -24,6 +24,24 @@ export class CellRange {
|
||||
return !this.isEmpty() && this._start?.row === this._end?.row
|
||||
}
|
||||
|
||||
isCellInRange(cell: Cell) {
|
||||
return (
|
||||
!this.isEmpty() &&
|
||||
cell.row >= this.start.row &&
|
||||
cell.row <= this.end.row &&
|
||||
cell.col >= this.start.col &&
|
||||
cell.col <= this.end.col
|
||||
)
|
||||
}
|
||||
|
||||
isRowInRange(row: number) {
|
||||
return !this.isEmpty() && row >= this.start.row && row <= this.end.row
|
||||
}
|
||||
|
||||
isColInRange(col: number) {
|
||||
return !this.isEmpty() && col >= this.start.col && col <= this.end.col
|
||||
}
|
||||
|
||||
get start(): Cell {
|
||||
return {
|
||||
row: Math.min(this._start?.row ?? NaN, this._end?.row ?? NaN),
|
||||
|
||||
Reference in New Issue
Block a user