Repository navigation
fix: clear multiselect and file cells with appropriate empty values - #1030
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 fixes the handling of cell clearing operations for multiselect and file cells by using appropriate empty values instead of empty strings. The fix ensures that when users delete or clear cells via keyboard shortcuts or context menu, different cell types receive semantically correct empty values (arrays for multi-select/file, null for number/date, false for checkbox, and empty string for text).
Key Changes
- Updated keyboard delete handler and context menu clear action to determine cell variant and assign appropriate empty values
- Fixed MultiSelectCell and FileCell components to properly sync their internal state when cell values change externally
- Removed obsolete comment about clearing search input in MultiSelectCell
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/hooks/use-data-grid.tsx | Added logic to detect cell variants and assign appropriate empty values ([], null, false, or "") when clearing cells via Delete/Backspace keys |
| src/components/data-grid/data-grid-context-menu.tsx | Added same cell variant detection logic for context menu "Clear" action and updated dependency array to include table |
| src/components/data-grid/data-grid-cell-variants.tsx | Added state synchronization when cellValue changes for MultiSelectCell and FileCell; removed obsolete comment |
| public/r/data-grid.json | Updated component content to reflect the changes (registry update) |
💡 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
…admann7#1030) * fix: clear multiselect and file cells with appropriate empty values * fix: revoke object URLs in FileCell to prevent memory leaks
anhdd-kuro
pushed a commit
to anhdd-kuro/tablecn
that referenced
this pull request
Apr 8, 2026
…admann7#1030) * fix: clear multiselect and file cells with appropriate empty values * fix: revoke object URLs in FileCell to prevent memory leaks
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.