Repository navigation
feat(data-grid): update callbacks - #1014
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
onRowsDeletecallback support for deleting multiple rows - Moved
onRowAddcallback 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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.