Value of `<select>` is set before the children are created when using spread
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 1.1k
- Avg merge
- 9h 18m
- Merged PRs (30d)
- 195
Description
Describe the bug
When using spread on a select element the value will be set before the children are created and this will cause the value to be set to an empty string (this is a browser behavior because no option match).
Your Example Website or App
https://playground.solidjs.com/anonymous/d2bf2e03-5e3b-4a9c-a5c0-37a62bbc8f9c
Steps to Reproduce the Bug or Issue
- Open the example
- Look at the result
Expected behavior
The second and third select boxes should have the same option selected.
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Edge
- Version: 113
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Solid playground reproduction and inspect how spread props are applied to the element and its children. Reproduce the mismatch, then verify that the second and third select boxes retain the same selected option after their children are created.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100