Repository navigation
Conversation
- Add onFilesUpload and onFilesDelete callbacks to useDataGrid hook - Support batched file operations with object parameters - Update FileCell to use external callbacks when provided - Add demo implementation showing API integration pattern - Maintain backward compatibility with fallback to local URLs
|
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 external file upload and delete callback support to the data-grid component, enabling consumers to implement custom file handling logic (e.g., uploading to a server or cloud storage) instead of relying on local blob URLs.
Key Changes
- Added
onFilesUploadandonFilesDeletecallback props touseDataGridhook - Modified
FileCellcomponent to call external callbacks when provided, falling back to local behavior - Removed explanatory comments from FileCell implementation
- Updated parameter naming from
propstoparamsforonDataUpdate
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/types/data-grid.ts | Added type definitions for file upload/delete callbacks and renamed onDataUpdate parameter |
| src/hooks/use-data-grid.tsx | Threaded new callbacks through the hook to table meta |
| src/components/data-grid/data-grid-demo.tsx | Added example implementations showing API integration patterns |
| src/components/data-grid/data-grid-cell-variants.tsx | Integrated callbacks into FileCell, refactored drag-and-drop handlers, removed comments |
| public/r/data-grid.json | Updated registry content with new implementations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
All file addition methods (cell drop, dropzone drop, file input) should use skipUpload=false to properly trigger the external upload callback and show loading states.
noodleman1991
pushed a commit
to noodleman1991/tablecn
that referenced
this pull request
Mar 12, 2026
…1034) * feat: add external file upload/delete callbacks to data grid - Add onFilesUpload and onFilesDelete callbacks to useDataGrid hook - Support batched file operations with object parameters - Update FileCell to use external callbacks when provided - Add demo implementation showing API integration pattern - Maintain backward compatibility with fallback to local URLs * chore: rebuild registry * fix: ensure all file additions trigger upload callback All file addition methods (cell drop, dropzone drop, file input) should use skipUpload=false to properly trigger the external upload callback and show loading states. * chore: remove logs
anhdd-kuro
pushed a commit
to anhdd-kuro/tablecn
that referenced
this pull request
Apr 8, 2026
…1034) * feat: add external file upload/delete callbacks to data grid - Add onFilesUpload and onFilesDelete callbacks to useDataGrid hook - Support batched file operations with object parameters - Update FileCell to use external callbacks when provided - Add demo implementation showing API integration pattern - Maintain backward compatibility with fallback to local URLs * chore: rebuild registry * fix: ensure all file additions trigger upload callback All file addition methods (cell drop, dropzone drop, file input) should use skipUpload=false to properly trigger the external upload callback and show loading states. * chore: remove logs
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.