Skip to content

fix(apollo-vertex): add expanded row in data table#388

Open
alincadariu wants to merge 1 commit intomainfrom
alincadariu/datatable-row-expanded
Open

fix(apollo-vertex): add expanded row in data table#388
alincadariu wants to merge 1 commit intomainfrom
alincadariu/datatable-row-expanded

Conversation

@alincadariu
Copy link
Collaborator

@alincadariu alincadariu commented Mar 23, 2026

i realized we broke the expanded row example with the data table hooks refactors.

Summary

  • Wire up the existing expand column in the DataTable template with expanded state, onExpandedChange, and renderExpandedRow
  • Reorder columns to: select, expand, status, email, amount, actions
  • Fix duplicate React key warning in data-table.tsx by using React.Fragment with key

Test plan

  • Clear localStorage for payments-demo keys
  • Visit the data table page and verify the expand chevron appears after the select checkbox
  • Click the chevron to expand a row and verify payment details are shown
  • Click again to collapse

🤖 Generated with Claude Code

@github-actions
Copy link

github-actions bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Mar 24, 2026, 03:27:42 AM
apollo-landing 🟢 Ready Preview, Logs Mar 24, 2026, 03:25:07 AM
apollo-ui-react 🟢 Ready Preview, Logs Mar 24, 2026, 03:26:27 AM
apollo-vertex 🟢 Ready Preview, Logs Mar 24, 2026, 03:26:26 AM
apollo-wind 🟢 Ready Preview, Logs Mar 24, 2026, 03:25:13 AM

@KokoMilev KokoMilev enabled auto-merge (rebase) March 23, 2026 12:02
@github-actions
Copy link

github-actions bot commented Mar 23, 2026

Dependency License Review

  • 1917 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 3 package(s) excluded (see details below)
License distribution
License Packages
MIT 1682
ISC 89
Apache-2.0 56
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 5
MIT OR Apache-2.0 3
MIT-0 3
CC0-1.0 3
LGPL-3.0-or-later 2
(MIT OR Apache-2.0) 2
Unlicense 2
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@img/sharp-libvips-linuxmusl-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@alincadariu alincadariu force-pushed the alincadariu/datatable-row-expanded branch from 934cab0 to 09bd6e1 Compare March 24, 2026 10:17
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alincadariu alincadariu force-pushed the alincadariu/datatable-row-expanded branch from 09bd6e1 to fab8c6d Compare March 24, 2026 10:24
@alincadariu alincadariu requested review from a team and KokoMilev March 24, 2026 10:24
expanded={expanded}
onExpandedChange={setExpanded}
renderExpandedRow={(row) => {
const payment = row.original as Payment;
Copy link
Contributor

Choose a reason for hiding this comment

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

The cast is not needed.

renderExpandedRow={(row) => {
const payment = row.original as Payment;
return (
<div className="grid grid-cols-4 gap-4 p-4 text-sm">
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add some left margin/padding to the expanded row since it doesn't look pretty at the moment.

Image

In my opinion this looks better:

Image

expanded={expanded}
onExpandedChange={setExpanded}
renderExpandedRow={(row) => {
const payment = row.original as Payment;
Copy link
Contributor

Choose a reason for hiding this comment

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

This cast is not needed.

return (
<div className="grid grid-cols-4 gap-4 p-4 text-sm">
<div>
<span className="text-muted-foreground">ID</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add more data props (like date, method, etc..) which to be shown in the expanded row, since the information looks very repeatable

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