Autocomplete: timeline for stable release (and stable virtual-focus API for ListBox)

Abierto
#10,843 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
react, typescript

Línea de trabajo

Start by reading the React Aria Components Autocomplete documentation and the ListBox props, then compare the documented useListBox option shouldUseVirtualFocus with the component API. The issue asks about stabilizing Autocomplete and making virtual focus a supported ListBox prop; done would mean a maintainer decision and, if accepted, a documented stable API. The issue does not name implementation files or tests.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Provide your feedback here.

What's the plan and rough timeline for moving Autocomplete in react-aria-components from RC to stable?

The docs page is tagged rc (#9289), and the underlying @react-aria/autocomplete package is still 3.0.0-rc.x. Our design system has a policy against shipping RC APIs, so we can't use it in production yet.

Related question: SelectableCollectionContext and FieldInputContext are exported from the same Autocomplete module, so we treat them as RC too. Would you consider exposing shouldUseVirtualFocus as a documented prop on RAC ListBox (it's already a documented option of useListBox)? Then a custom search input could drive a ListBox with virtual focus without depending on Autocomplete.

🔦 Context

We have a "search input + suggestions" component built on RAC ListBox (with optional Virtualizer). We want DOM focus to stay on the input while the arrow keys move virtual focus in the list and Enter selects, which is exactly what Autocomplete provides.

Without a stable API, our workaround is:

  • Pass shouldUseVirtualFocus to <ListBox> (not in ListBoxProps; it only works because RAC spreads props into useListBox).
  • Re-dispatch the input's keydown on the listbox element, since useSelectableCollection's keyboard handler ignores events whose target is outside the collection. On Enter, dispatch a click on the focused option.

We'd prefer to drop this in favour of a supported API.

💻 Code Sample
<ListBox ref={listRef} shouldUseVirtualFocus /* undocumented */ items={items}>…</ListBox>

// search input onKeyDown
listRef.current.dispatchEvent(new KeyboardEvent(e.type, e.nativeEvent));
Version

react-aria-components 1.21.0, react-aria 3.52.0, React 19.2

Lenguaje dominante
TypeScript
Estrellas
16k
Forks
1.6k
Merge medio
2 d 17 h
PR fusionados (30 d)
41

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de adobe/react-spectrum

Todos los issues de adobe/react-spectrum

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.