adobe / adobe/react-spectrum

Combobox not showing input value when using e defaultSelectedKey and autofocus

Open
#9,389 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Discussed in https://github.com/adobe/react-spectrum/discussions/9387

Originally posted by **francescosac95** December 22, 2025
Hey everyone,

I am using Combobox from react aria components and I am running into an issue (Uncontrolled component).
The issue is when I have the combobox on autofocus and I have a defaultSelected key, the input value is empty. When I blur out I can see the right input value for the default selected key.
When I remove the autofocus everything works as expected, on initial render I can see the default selected key with the right input value.
Am I missing something? Is this how it's supposed to be working or is it a bug?

Reproduction https://stackblitz.com/edit/j8e97chh?file=src%2FExample.tsx

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.