adobe / adobe/react-spectrum

Button does not recognize the pending state of `useFormStatus`

Open
#7,543 3 comments 2 reactions 0 assignees View on GitHub
Button help wanted needs investigation
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

The `Button` using `useButton` and RAC `Button` doesn't reflect the pending state from `useFormStatus`.

### 🤔 Expected Behavior?

The button should reflect the pending state when interacting with it using Enter, Space, or click.

### 😯 Current Behavior

The `Button` created with `useButton` does not reflect the pending state when pressing the Enter key.
In React Aria Components, interactions via Enter, Space, or click do not trigger the pending state.

### 💁 Possible Solution

_No response_

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

1. Try interacting with the button using Enter, Space, and click.
2. Observe that the pending state is not reflected as expected.

You can use the following sandbox to reproduce the issue:
[CodeSandbox: infallible-meadow-yycwxf](https://codesandbox.io/p/sandbox/infallible-meadow-yycwxf?workspaceId=ws_5oossX9TSy5f54qFo1L3Y9)

https://github.com/user-attachments/assets/780dd597-0874-424c-9c86-01b55624cff8

### Version

react-aria: 3.36.0, react-aria-components: 1.5.0

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

Chrome

### If other, please specify.

_No response_

### What operating system are you using?

macOS 14.6.1

### 🧢 Your Company/Team

NextUI

### 🕷 Tracking Issue

[[BUG] Button not recognizing pending state of useFormStatus hook · Issue #4397 · nextui-org/nextui](https://github.com/nextui-org/nextui/issues/4397)

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.