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

Đang mở
#10,843 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
accessibility, frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
16k
Fork
1.6k
Merge trung bình
3 ngày 19 giờ
Pull request đã merge (30 ngày)
46

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của adobe/react-spectrum

Tất cả issue của adobe/react-spectrum

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.