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

オープン
#10,843 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
react, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
16k
フォーク
1.6k
平均マージ
2日 17時間
マージ済み PR(30日)
41

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

adobe/react-spectrum のほかの issue

adobe/react-spectrum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。