select value is not reflected if the list of options are loaded at a later time
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 1.1k
- Avg merge
- 9h 18m
- Merged PRs (30d)
- 195
Description
Describe the bug
I am loading a list of select options from an API so the options get populated a bit after the element is rendered. The value of the select is already set but is not reflected after the list is loaded.
Your Example Website or App
https://playground.solidjs.com/anonymous/afff844c-d8cb-40ab-b368-7b0fe268ab6d
Steps to Reproduce the Bug or Issue
- create a set its value use to populate its options from an array load the array of options using a timeout so that is populated after the render Expected behavior I expect the value of the select to be reflect the correct option regardless of when that option is rendered Screenshots or Videos No response Platform Browser: [Chrome] 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 and reproduce the case using a select, a preset value, a delayed options array, and . Trace how the select value is handled when options appear after render; done means the preset value reflects the matching option regardless of when that option is rendered.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100