Skip to content

Conversation

@marcellofuschi
Copy link

@marcellofuschi marcellofuschi commented Dec 6, 2025

Working with DataGrid I found myself needing to unselect the selected cell (when the user moves focus to an external element)

@marcellofuschi marcellofuschi force-pushed the expose-unselect-cell-handle branch from 0d13a12 to 0135d78 Compare December 6, 2025 12:16
@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.09%. Comparing base (17d564b) to head (0135d78).

Files with missing lines Patch % Lines
src/DataGrid.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3927      +/-   ##
==========================================
- Coverage   97.34%   97.09%   -0.25%     
==========================================
  Files          36       36              
  Lines        1169     1172       +3     
  Branches      345      345              
==========================================
  Hits         1138     1138              
- Misses         31       34       +3     
Files with missing lines Coverage Δ
src/DataGrid.tsx 98.10% <0.00%> (-0.71%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amanmahajan7
Copy link
Collaborator

The selection outline persists even when the cell is not focused. We can do the following to show the outline only on focused cells? Does that work for you or the intention is to actually clear the selected position?

<DataGrid className="my-class" ../>

.my-class {
  .rdg-cell[aria-selected='true'] {
    outline: none;
  }

  .rdg-cell:focus {
    outline: var(--rdg-selection-width) solid var(--rdg-selection-color);
  }
} 

https://github.com/Comcast/react-data-grid/blob/main/src/style/cell.ts#L25

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.

3 participants