Skip to content

feat(data-grid): update callbacks - #1014

Merged
sadmann7 merged 8 commits into
mainfrom
update-entities
Oct 27, 2025
Merged

sadmann7 merged 8 commits into
mainfrom
update-entities

Conversation

@sadmann7

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings October 27, 2025 12:22
@vercel

vercel Bot commented Oct 27, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Updated (UTC)
shadcn-table Ready Ready Preview Oct 27, 2025 0:22am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds row deletion functionality to the data grid component and refactors callback handling. The key changes include introducing an onRowsDelete callback that allows consumers to handle batch row deletion, moving the onRowAdd callback from component props to the useDataGrid hook for consistency, and improving internal callback naming.

Key Changes:

  • Added onRowsDelete callback support for deleting multiple rows
  • Moved onRowAdd callback from DataGrid component to useDataGrid hook
  • Added context menu option for deleting selected rows

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/types/data-grid.ts Added onRowsDelete callback type definition to table meta
src/hooks/use-data-grid.tsx Implemented onRowsDelete handler, moved onRowAdd logic from component, renamed internal cleanup functions
src/components/data-grid/data-grid.tsx Removed onRowAdd prop and implementation (now handled by hook)
src/components/data-grid/data-grid-demo.tsx Added onRowsDelete implementation and moved onRowAdd to hook props
src/components/data-grid/data-grid-context-menu.tsx Added delete rows menu item with row deletion logic
src/app/data-grid/page.tsx Improved loading skeleton UI
next.config.ts Reordered config properties

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/data-grid/data-grid-demo.tsx
@sadmann7
sadmann7 merged commit 74cafbc into main Oct 27, 2025
7 checks passed
@sadmann7
sadmann7 deleted the update-entities branch October 27, 2025 12:28
noodleman1991 pushed a commit to noodleman1991/tablecn that referenced this pull request Mar 12, 2026
* feat: better skeleton

* refactor: states

* feat: update page

* feat: update page again

* chore: update config

* feat: add onrowsdelete

* feat: add onrowsdelete

* feat: update demo
anhdd-kuro pushed a commit to anhdd-kuro/tablecn that referenced this pull request Apr 8, 2026
* feat: better skeleton

* refactor: states

* feat: update page

* feat: update page again

* chore: update config

* feat: add onrowsdelete

* feat: add onrowsdelete

* feat: update demo

This branch was successfully deployed

2 active deployments
Preview – tablecn — 14282c15 Deployed Oct 27, 2025 by vercel[bot]
Preview – shadcn-table — 14282c15 Deployed Oct 27, 2025 by vercel[bot]
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