π±οΈWorking with selections
const [selection, setSelection] = React.useState<GridSelection>({
columns: CompactSelection.empty(),
rows: CompactSelection.empty(),
});
return <DataEditor
{...otherProps}
gridSelection={selection}
onGridSelectionChange={setSelection}
/>interface GridSelection {
readonly current?: {
readonly cell: Item;
readonly range: Readonly<Rectangle>;
readonly rangeStack: readonly Readonly<Rectangle>[];
};
readonly columns: CompactSelection;
readonly rows: CompactSelection;
}Last updated