glideapps / glideapps/glide-data-grid
How to Cancel Rows Selection ?
- Dominant language
- TypeScript
- Stars
- 5.3k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
**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
});
};
Contributor guide
Assessment
This issue has not been assessed yet.