Select loses its bound value when options load asynchronously
维护者通常 1 天内回复
@MokiMeow 已经在做这个了。
开始于 2026年10月8日。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, typescript
- 领域
- 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
- Open the playground and wait for the 200ms load to finish.
- The dropdown shows
a, although the JSX specifiesvalue="b". - Remove
await delay(200)from the memo. The same example correctly selectsb.
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/compiler2.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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
solidjs/solid 的其他 Issue
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14可能已有人在做 @itisrmk 于 2 天前认领。 未关闭1.x
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
[2.0 rc.15 + next] For row lifecycle cleanup inherits the list computation and halts on a shared-state write可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 51/100
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 48/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
-
`createRoot`'s dispose function keeps `fn` alive, so `<For>`/`<Index>` rows retain removed list items可能已有人在做 @boombang 于 4 天前认领。 未关闭1.x
难度 4/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
area:workflow bug ready-for-human
难度 1/5 1 小时以内 新手友好度 78/100
fil-donadoni/tolaria#6108 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
apache/rocketmq-dashboard#7234 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
vitest-dev/vitest#11656 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
ehmpathy/rhachet-roles-bhrain#655 ·
维护者通常 1 天内回复