openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

CellSelector: Support Ctrl+Click for noncontiguous cell selection and quick deselect with click

Open TawillAvi opened this issue 3 months ago • 1 comments

Why are you proposing this feature?

Summary

Please enhance sap.m.plugins.CellSelector to improve ad-hoc cell selection workflows in data tables:

Ctrl+Click add/remove: Allow selecting multiple, non-adjacent cells by holding Ctrl and clicking cells.

Click to deselect: Allow deselecting a cell by clicking it again (toggle), and/or provide an option to clear the entire selection when clicking outside the current selection.

Motivation / Use case

In analysis scenarios users often need to copy or operate on scattered cells (e.g., “A2, C2, F7”) without selecting whole ranges. Excel-style interactions (Ctrl+Click to add/remove individual cells) are familiar and reduce steps versus drawing multiple ranges. Quick deselect avoids reaching for a separate “clear selection” action.

Current behavior

CellSelector supports contiguous ranges via drag/shift and keyboard navigation, with incremental improvements in recent releases, but noncontiguous selection via Ctrl+Click isn’t available and deselect is not straightforward. See recent notes mentioning CellSelector improvements (selection behavior and ranges) in the 1.120 line.

How should a possible solution look like?

Proposed behavior

Ctrl+Click (Windows/Linux) / Cmd+Click (macOS) toggles the clicked cell’s membership in the current selection set without affecting other selected cells.

Click on an already-selected cell toggles it off (deselect).

Optional config flags (API proposal below) to tailor behavior:

enableNonContiguousSelection: boolean (default false)

toggleOnClickSelected: boolean (default true when non-contiguous is enabled)

clearOnBackgroundClick: boolean (default false)

Keyboard parity (optional but nice-to-have): a shortcut to “add/remove selection” mode similar to other tools.

Are there alternative approaches?

No response

Any further information you would like to share?

No response

TawillAvi avatar Sep 29 '25 12:09 TawillAvi

Dear @TawillAvi,

We have created an internal feature request with the following ID: DINC0654709

The reposnsible colleagues, would take a look and decide on how to proceed with this one!

Thanks for your proposal!

d3xter666 avatar Oct 02 '25 06:10 d3xter666