adobe / adobe/react-spectrum

Tabs component, trigger onSelectionChange on hover

Open
#5,611 5 comments 1 reaction 0 assignees View on GitHub
bug help wanted
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

This is the component i'm using:
```
{
alert(key);
}}>

Mouse Settings
Keyboard Settings

Mouse Settings
Keyboard Settings

```
The problem is the alert is appearing every time i hover the selected tab

### 🤔 Expected Behavior?

onSelectionChange should be triggered only on change, not on hover

### 😯 Current Behavior

onSelectionChange triggers also on hover on current tab (it looks only while the tab is focused)

### 💁 Possible Solution

_No response_

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/epic-bogdan-sjd6ky

### Version

"react-aria-components": "^1.0.0",

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

Chrome

### If other, please specify.

_No response_

### What operating system are you using?

Mac OS

### 🧢 Your Company/Team

_No response_

### 🕷 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.