From 6ea86b1b56aebbae7edeb37b01d7bf5cd145bf60 Mon Sep 17 00:00:00 2001 From: Josh Kingsley Date: Thu, 6 Nov 2025 22:31:12 +0200 Subject: feat(web): change subvisions --- web/src/components/grid/selection.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web/src/components/grid/selection.ts') diff --git a/web/src/components/grid/selection.ts b/web/src/components/grid/selection.ts index a24bbf5..517f8ae 100644 --- a/web/src/components/grid/selection.ts +++ b/web/src/components/grid/selection.ts @@ -1,4 +1,5 @@ import { CellRef, cellRefEquals } from "../../types"; +import { RenderedGrid } from "./renderGrid"; export type CellRange = [start: CellRef, end: CellRef]; @@ -21,3 +22,7 @@ export function extendSelection( return { ...selection, range: [selection.activeCellRef, cellRef] }; } + +export function getSelectionRange(selection: GridSelection): CellRange { + return selection.range ?? [selection.activeCellRef, selection.activeCellRef]; +} -- cgit v1.2.3