Skip to content

fix(select-bound-info): key dropdown items by value, not index#2159

Open
Aias00 wants to merge 1 commit into
OtterMind:mainfrom
Aias00:fix/2153-selectboundinfo-key
Open

fix(select-bound-info): key dropdown items by value, not index#2159
Aias00 wants to merge 1 commit into
OtterMind:mainfrom
Aias00:fix/2153-selectboundinfo-key

Conversation

@Aias00

@Aias00 Aias00 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Related issue

Closes #2153

Summary

SelectBoundInfo rendered selectedList with key={index}. The list reorders/shrinks as the user picks database → schema → table, so index-keyed items got reused across different option types, causing React to patch the wrong DOM node. Changed to key={item.value} and removed the now-unused index param.

Verification

  • tsc + eslint clean for SelectBoundInfo/index.tsx.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.

selectedList reorders/shrinks as the user picks database → schema →
table, so key={index} reused the wrong DOM nodes. Use item.value.

Fixes OtterMind#2153

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 26, 2026 06:49
@Aias00
Aias00 requested a review from openai0229 as a code owner July 26, 2026 06:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

SelectBoundInfo uses key={index} on a mutable dropdown list (stable id available)

2 participants