mi6 / mi6/ic-ui-kit

Internal issue 3156 - IcSelects fail to load selected value

Open
#4,254 2 comments 0 reactions 0 assignees View on GitHub
select component
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

When reloading the page, IcSelects fail to populate their selected value properly **when the values come from an API (or have an imposed delay).**

See stackblitz here for example: https://stackblitz.com/edit/vitejs-vite-oomsyzls?file=src%2Fservice%2Fservice.ts
To replicate issue in stackblitz:
- Refresh your page multiple times, you should see the selected value on the IcSelect popping in and out.
- If you don't, please can you increase the timeout in the service.ts file (directly linked above). This should at some point mean the selected value stops appearing.

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction, especially service.ts, and reproduce the issue by refreshing while the API response is delayed. Trace how IcSelect receives the delayed values and selected value; the issue is done when the selected value consistently appears after reloads with delayed API data.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.