Skip to content

fix: reset stale selectedIndex when options shrink#535

Merged
bendera merged 2 commits into
mainfrom
issue-530-reset-stale-selectedindex
Sep 14, 2025
Merged

fix: reset stale selectedIndex when options shrink#535
bendera merged 2 commits into
mainfrom
issue-530-reset-stale-selectedindex

Conversation

@bendera

@bendera bendera commented Sep 14, 2025

Copy link
Copy Markdown
Member

Fix Prettier issues

dankeboy36 and others added 2 commits September 14, 2025 14:28
Reading value could throw after dynamically reducing options. If the
selected index exceeds the new option count, clear/clamp selection to a
valid state to prevent crashes.

For example, when React dynamically renders options for the select.

Closes #530

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
@bendera bendera merged commit 827eb2d into main Sep 14, 2025
3 checks passed
@bendera bendera deleted the issue-530-reset-stale-selectedindex branch September 14, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants