solidjs / solidjs/solid

select value is not reflected if the list of options are loaded at a later time

Open
#2,241 6 comments 1 reaction 0 assignees View on GitHub

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
  1. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.