Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Select loses its bound value when options load asynchronously

已关闭
#3,928 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@MokiMeow 已经在做这个了。

开始于 2026年10月8日。

评估

难度
3/5
预计耗时
半天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
frontend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
36.1k
派生
1.1k
平均合并
11 小时 37 分钟
30 天内合并 PR
344

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

solidjs/solid 的其他 Issue

查看 solidjs/solid 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。