Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Select loses its bound value when options load asynchronously

Đã đóng
#3,928 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

@MokiMeow đang làm issue này rồi.

Từ ngày 8/10/2026.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start by reproducing the report with a client-only <select value="b"> whose <option> children come from an async createMemo inside a Loading boundary, using the linked playground. Look at how the renderer applies the value binding to a select element, especially the immediate assignment and the microtask reapplication the reporter describes. Done means the bound option is selected once the async options arrive, and the case passes in both development and production builds.

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

Mô tả

Describe the bug

A <select value="b"> selects the first option (a) when its options come from an async createMemo, even inside a Loading boundary. Once loading finishes, both options exist, but the bound value is not selected.

Your Example Website or App

https://s.olid.uk/id/36b77c4b-f856-46fc-ba7f-9079194065f3

Steps to Reproduce the Bug or Issue
  1. Open the playground and wait for the 200ms load to finish.
  2. The dropdown shows a, although the JSX specifies value="b".
  3. Remove await delay(200) from the memo. The same example correctly selects b.
Expected behavior

When the options finish loading and the select is revealed, it should select b, matching its bound value.

Screenshots or Videos

No response

Platform
  • OS: Linux (WSL)
  • Browser: Chromium 153.0.8010.12
  • Solid: solid-js, @solidjs/web, and @solidjs/compiler 2.0.0-rc.14
Additional context

Reproduces in development and production, with client rendering only.

The select value is assigned immediately and again in a microtask, while there are no options. When the async options arrive later, the browser selects the first one and the value binding is not reapplied.

The repro does not require SSR, component wrappers, actions, stores, or styling.

Ngôn ngữ chính
TypeScript
Star
36.1k
Fork
1.1k
Merge trung bình
10 giờ 42 phút
Pull request đã merge (30 ngày)
361

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 solidjs/solid

Tất cả issue của solidjs/solid

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.