adobe / adobe/react-spectrum

[RAC] Checkbox not recognizing shift-click inside collections

Open
#8,662 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the issue here

Currently, you can select multiple selections in a collection (e.g. Tree in this example).
See video:

https://github.com/user-attachments/assets/782633b1-e889-4fac-9176-b9856d17a72b

However, the functionality lacks when doing the same action on a Checkbox within the collection items.

See video:

https://github.com/user-attachments/assets/0bb7f0a6-3bec-4d40-a849-69df35f30891

### 🤔 Expected Behavior?

Ideally, shift-clicking the Checkbox should behave the same and select items between.

### 😯 Current Behavior

Checkbox does not apply multi-selection functionality with keyboard actions.

### 💁 Possible Solution

Expose same events to slot="selection", that you already expose to the list

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

1. Go to a collection component
2. Select a checkbox
3. Shift-click a checkbox a few rows away

See video above for clarity

### Version

RAC 1.11.0

### What browsers are you seeing the problem on?

Chrome

### If other, please specify.

_No response_

### What operating system are you using?

MacOS Sequoia 15.5

### 🧢 Your Company/Team

Ubiquiti Inc

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.