Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on a (single) selected row should not unselect it #1704

Closed
rbasralian opened this issue Dec 28, 2023 · 1 comment · Fixed by #1740
Closed

Clicking on a (single) selected row should not unselect it #1704

rbasralian opened this issue Dec 28, 2023 · 1 comment · Fixed by #1740
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rbasralian
Copy link

If I double-click a row in the UI, it should still be selected, rather than the first click selecting it and the second click unselecting it. (You can still unselect a row with cmd+click.) In particular, it's confusing for linked tables, since you wind triggering the links based on an unselected row.

It'd also be more consistent with the multiple-row-selection experience — if you click and drag to select a handful of rows, and then click on one of them, it updates the selection to be just the one row you clicked on (rather than unselecting that row). And if click and drag to select select a handful of rows, and then click and drag again on the same set of rows, you wind up with all of them selected instead of unselected.

(It's also how the legacy swing UI works).

@rbasralian rbasralian added enhancement New feature or request triage Issue requires triage labels Dec 28, 2023
@vbabich vbabich removed the triage Issue requires triage label Jan 9, 2024
@vbabich vbabich added this to the January 2024 milestone Jan 9, 2024
@dsmmcken
Copy link
Contributor

dsmmcken commented Jan 19, 2024

I agree on the double-click leaving the row unselected in a linker scenario sucks. I propose we address this by having double click always result in the row being selected (rather than toggling twice, with the selection result being the inverse same as however it started).

However, I like that single click still unselects. It is a familiar pattern, and I think we should leave that as is.

ex. react-spectrum list (this component will eventually be something users can create via dh.ui, so it's good to have the same behavior).

spectrum

ex. gmail, I acknowledge this contains a checkbox so it's not quite the same as our row based selection but, feels similar in a way users would find familiar:

selection

dsmmcken added a commit that referenced this issue Jan 19, 2024
mofojed pushed a commit that referenced this issue Jan 25, 2024
…gle selection twice (#1740)

resolves: #1704

each click still toggles immediately, but the final state will always be
selected as double click handler comes after.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants