Skip to content

fix(sql-editor): show correct row data in detail panel when results are sorted#19252

Merged
ecmadao merged 1 commit intomainfrom
fix/detail-panel-sorting-bug
Feb 6, 2026
Merged

fix(sql-editor): show correct row data in detail panel when results are sorted#19252
ecmadao merged 1 commit intomainfrom
fix/detail-panel-sorting-bug

Conversation

@vsai12
Copy link
Contributor

@vsai12 vsai12 commented Feb 5, 2026

Summary

  • Fix detail panel showing wrong row data when query results are sorted
  • Add originalRowIndex prop to TableCell to track the original row index separately from display position
  • Update VirtualDataTable and VirtualDataBlock to pass row.key as the original index

Problem

When query results are sorted by clicking a column header, double-clicking a cell to view details showed data from the wrong row. The detail panel was using the display position index to look up data in the original unsorted result array.

Test plan

  • Run a query that returns multiple rows
  • Sort by any column (click column header)
  • Double-click a cell to open detail panel
  • Verify detail panel shows correct data for the clicked row
  • Test in both table view and block view modes
  • Verify row selection still works correctly

🤖 Generated with Claude Code

…re sorted

When query results are sorted, double-clicking a cell to view details
showed data from the wrong row. The detail panel was using the display
position index to look up data in the original unsorted result array.

Add originalRowIndex prop to TableCell to pass the original row index
separately from the display position, ensuring the detail panel always
shows the correct row data regardless of sorting state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vsai12 vsai12 requested a review from a team as a code owner February 5, 2026 20:17
@cla-bot cla-bot bot added the cla-signed label Feb 5, 2026
@ecmadao ecmadao merged commit 873a83e into main Feb 6, 2026
11 checks passed
@ecmadao ecmadao deleted the fix/detail-panel-sorting-bug branch February 6, 2026 01:52
@d-bytebase
Copy link
Collaborator

/backport

github-actions bot pushed a commit that referenced this pull request Feb 6, 2026
…re sorted (#19252)

When query results are sorted, double-clicking a cell to view details
showed data from the wrong row. The detail panel was using the display
position index to look up data in the original unsorted result array.

Add originalRowIndex prop to TableCell to pass the original row index
separately from the display position, ensuring the detail panel always
shows the correct row data regardless of sorting state.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 873a83e)
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

d-bytebase pushed a commit that referenced this pull request Feb 6, 2026
…re sorted (#19252) (#19253)

When query results are sorted, double-clicking a cell to view details
showed data from the wrong row. The detail panel was using the display
position index to look up data in the original unsorted result array.

Add originalRowIndex prop to TableCell to pass the original row index
separately from the display position, ensuring the detail panel always
shows the correct row data regardless of sorting state.


(cherry picked from commit 873a83e)

Co-authored-by: Vincent Huang <40749774+vsai12@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants