Repository navigation
Fix #3370: row details overwrote the WHERE-clause id when the table has an id column #3386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e990ea8
2a074ff
c0a0ea7
c0445ee
5913984
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@hyperdx/app': patch | ||
| --- | ||
|
|
||
| Fix expanding a row on tables with a string `id` column: row details now keep the internal WHERE-clause id instead of being overwritten by the raw column value (#3370) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1363,10 +1363,10 @@ export const RawLogTable = memo( | |
| canOpenSidePanel={canOpenSidePanel} | ||
| > | ||
| {renderRowDetails?.({ | ||
| ...row.original, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 minor — No regression test for the id-column overwrite this PR fixes The RawLogTable inline-expand tests in Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond |
||
| id: rowId, | ||
| aliasWith: | ||
| row.original[INTERNAL_ROW_FIELDS.ALIAS_WITH], | ||
|
Comment on lines
+1366
to
1369
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fix changes which
Context Used: AGENTS.md (source) |
||
| ...row.original, | ||
| })} | ||
| </ExpandedLogRow> | ||
| )} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 minor — No regression test pins that
id/aliasWithoverride a same-named column in row detailsAdd a case to the existing inline-expand suite in
packages/app/src/components/__tests__/DBRowTable.test.tsx(baseProps ~line 316). Userows: [{ id: 'a5c1334f-...', col1: 'v' }]and ajest.fn()renderRowDetails, expand the row, then assert it was called withexpect.objectContaining({ id: ROW_ID }). Without it, moving the spread back afteridwould bring #3370 back and every test would still pass.Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond