Skip to content

How to Cancel Rows Selection ? #1191

Description

@islittlezhou
Image

remark: I want to be able to unselect a row when I hold down the CTRL key and left click on a selected row. How can this be achieved? Here is my code implementation for line selection.

const handleGridSelectionChange = (newSel) => {
let newRows = CompactSelection.empty();
if (newSel.current !== undefined) {
newRows = newRows.add([newSel.current.range.y, newSel.current.range.y + newSel.current.range.height]);
}
for (const b of newSel.current?.rangeStack ?? []) {
newRows = newRows.add([b.y, b.y + b.height]);
}
setSelection({
...newSel,
rows: newRows
});
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions